Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
package-sdk-server-telemetry-released: ${{ steps.release.outputs['pkgs/telemetry--release_created'] }}
package-shared-common-released: ${{ steps.release.outputs['pkgs/shared/common--release_created'] }}
package-shared-common-json-net-released: ${{ steps.release.outputs['pkgs/shared/common-json-net--release_created'] }}
package-shared-internal-released: ${{ steps.release.outputs['pkgs/shared/internal--release_created'] }}

steps:
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
Expand Down Expand Up @@ -145,3 +146,16 @@ jobs:
package_path: pkgs/shared/common-json-net
dry_run: false
generate_provenance: true

release-shared-internal:
needs: ['release-please']
permissions:
id-token: write
contents: write
attestations: write
if: ${{ needs.release-please.outputs.package-shared-internal-released == 'true'}}
uses: ./.github/workflows/release.yml
with:
package_path: pkgs/shared/internal
dry_run: false
generate_provenance: true
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- pkgs/telemetry
- pkgs/shared/common
- pkgs/shared/common-json-net
- pkgs/shared/internal
dry_run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/server-shared-internal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: LaunchDarkly.InternalSdk CI

on:
push:
branches: [ main, 'feat/**' ]
paths:
- '.github/**'
- 'global.example.json'
- 'pkgs/shared/internal/**'
- '!**.md'
pull_request:
branches: [ main, 'feat/**' ]
paths:
- '.github/**'
- 'global.example.json'
- 'pkgs/shared/internal/**'
- '!**.md'

jobs:
build-and-test:
strategy:
matrix:
include:
- os: ubuntu-latest
framework: netstandard2.0
test_framework: net8.0
- os: windows-latest
framework: net462
test_framework: net462

runs-on: ${{ matrix.os }}

defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'powershell' || 'bash' }}

steps:
- uses: actions/checkout@v4

- name: Setup Env from project's Env file
shell: bash
run: echo "$(cat pkgs/shared/internal/github_actions.env)" >> $GITHUB_ENV

- uses: ./.github/actions/ci
with:
project_file: ${{ env.PROJECT_FILE }}
test_project_file: ${{ env.TEST_PROJECT_FILE }}
target_test_framework: ${{ matrix.test_framework }}
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"pkgs/telemetry": "1.5.1",
"pkgs/sdk/server-ai": "0.11.0",
"pkgs/shared/common": "7.2.0",
"pkgs/shared/common-json-net": "7.0.2"
"pkgs/shared/common-json-net": "7.0.2",
"pkgs/shared/internal": "3.8.0"
}
21 changes: 21 additions & 0 deletions DotnetCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "repo-docs", "repo-docs", "{
LICENSE = LICENSE
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "internal", "internal", "{B19B9B2A-CCE2-4FA7-824E-7140F2E13E87}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.InternalSdk", "pkgs\shared\internal\src\LaunchDarkly.InternalSdk.csproj", "{BF4400E1-3831-4E28-AB05-F9B93FF9E2B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.InternalSdk.Tests", "pkgs\shared\internal\test\LaunchDarkly.InternalSdk.Tests.csproj", "{F66CD4A8-9DE2-498B-BBA2-B24E9955D1F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -121,6 +127,9 @@ Global
{561F6F3D-09C5-470A-83AC-F0E97BAD609B} = {EF541D97-2C23-4FB8-BD87-ADFDF0FF83F3}
{DE321396-6459-4C02-AF61-1A2677A7CB65} = {FF3153CA-F727-4666-BA1E-5459BE34FBAB}
{A10B580F-D937-4EA8-8CF8-4F130FBF6C16} = {822D49A6-1DF2-49BB-A3C0-15821ED718D6}
{B19B9B2A-CCE2-4FA7-824E-7140F2E13E87} = {E2905C95-49E1-4194-88DD-B30AA68EEF98}
{BF4400E1-3831-4E28-AB05-F9B93FF9E2B2} = {B19B9B2A-CCE2-4FA7-824E-7140F2E13E87}
{F66CD4A8-9DE2-498B-BBA2-B24E9955D1F2} = {B19B9B2A-CCE2-4FA7-824E-7140F2E13E87}
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2D61D2EC-8D04-46E9-9E1B-1E029341F318}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -249,5 +258,17 @@ Global
{A10B580F-D937-4EA8-8CF8-4F130FBF6C16}.Release|Any CPU.Build.0 = Release|Any CPU
{A10B580F-D937-4EA8-8CF8-4F130FBF6C16}.DebugLocalReferences|Any CPU.ActiveCfg = DebugLocalReferences|Any CPU
{A10B580F-D937-4EA8-8CF8-4F130FBF6C16}.DebugLocalReferences|Any CPU.Build.0 = DebugLocalReferences|Any CPU
{BF4400E1-3831-4E28-AB05-F9B93FF9E2B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF4400E1-3831-4E28-AB05-F9B93FF9E2B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF4400E1-3831-4E28-AB05-F9B93FF9E2B2}.DebugLocalReferences|Any CPU.ActiveCfg = Debug|Any CPU
{BF4400E1-3831-4E28-AB05-F9B93FF9E2B2}.DebugLocalReferences|Any CPU.Build.0 = Debug|Any CPU
{BF4400E1-3831-4E28-AB05-F9B93FF9E2B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF4400E1-3831-4E28-AB05-F9B93FF9E2B2}.Release|Any CPU.Build.0 = Release|Any CPU
{F66CD4A8-9DE2-498B-BBA2-B24E9955D1F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F66CD4A8-9DE2-498B-BBA2-B24E9955D1F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F66CD4A8-9DE2-498B-BBA2-B24E9955D1F2}.DebugLocalReferences|Any CPU.ActiveCfg = Debug|Any CPU
{F66CD4A8-9DE2-498B-BBA2-B24E9955D1F2}.DebugLocalReferences|Any CPU.Build.0 = Debug|Any CPU
{F66CD4A8-9DE2-498B-BBA2-B24E9955D1F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F66CD4A8-9DE2-498B-BBA2-B24E9955D1F2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
174 changes: 174 additions & 0 deletions pkgs/shared/internal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# Change log

All notable changes to `LaunchDarkly.InternalSdk` will be documented in this file. For full release notes for the projects that depend on this project, see their respective changelogs. This file describes changes only to the common code. This project adheres to [Semantic Versioning](http://semver.org).

## [3.8.0](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.7.0...3.8.0) (2026-06-16)


### Features

* Update target frameworks to net8.0 ([#69](https://github.com/launchdarkly/dotnet-sdk-internal/issues/69)) ([235c52f](https://github.com/launchdarkly/dotnet-sdk-internal/commit/235c52f7e83db46590b6d4ac81333e555d7e876d))

## [3.7.0](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.6.1...3.7.0) (2026-06-08)


### Features

* add optional support for per-context summary events ([#65](https://github.com/launchdarkly/dotnet-sdk-internal/issues/65)) ([d835d08](https://github.com/launchdarkly/dotnet-sdk-internal/commit/d835d08d062d6d71acebc6b572d112eed976a508))

## [3.6.1](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.6.0...3.6.1) (2026-04-09)


### Bug Fixes

* Update CommonSdk to 7.2.0 ([#60](https://github.com/launchdarkly/dotnet-sdk-internal/issues/60)) ([047a867](https://github.com/launchdarkly/dotnet-sdk-internal/commit/047a867705a4bb4fd0f9cad99e9a51ed733952ef))

## [3.6.0](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.5.5...3.6.0) (2025-12-16)


### Features

* adds headers to UnsuccessfulResponseException ([#52](https://github.com/launchdarkly/dotnet-sdk-internal/issues/52)) ([3cca2ff](https://github.com/launchdarkly/dotnet-sdk-internal/commit/3cca2ff29e779def2fe75770dfdd13b94433742f))

## [3.5.5](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.5.4...3.5.5) (2025-09-26)


### Bug Fixes

* Update CommonSdk to 7.1.1 ([#50](https://github.com/launchdarkly/dotnet-sdk-internal/issues/50)) ([b8d57d3](https://github.com/launchdarkly/dotnet-sdk-internal/commit/b8d57d30032a26fd3b034dcea00e24af4cc3be68))

## [3.5.4](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.5.3...3.5.4) (2025-08-22)


### Bug Fixes

* Prevent invalid strings from being part of format value ([#46](https://github.com/launchdarkly/dotnet-sdk-internal/issues/46)) ([b4c772e](https://github.com/launchdarkly/dotnet-sdk-internal/commit/b4c772e059a1f67c8c94c5c39dbb44ca31c2850e))

## [3.5.3](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.5.2...3.5.3) (2025-07-10)


### Bug Fixes

* Relax common dependency ([#44](https://github.com/launchdarkly/dotnet-sdk-internal/issues/44)) ([66913b1](https://github.com/launchdarkly/dotnet-sdk-internal/commit/66913b15b173cbb4eb4a55133989a5f3c21c6781))

## [3.5.2](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.5.1...3.5.2) (2025-06-24)


### Bug Fixes

* Address ARM64 optimization throwing exceptions ([#42](https://github.com/launchdarkly/dotnet-sdk-internal/issues/42)) ([bac4833](https://github.com/launchdarkly/dotnet-sdk-internal/commit/bac4833a526b9f63025a0c864ce41514e402718c))

## [3.5.1](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.5.0...3.5.1) (2025-05-30)


### Bug Fixes

* conditionalize immutable dependency ([#40](https://github.com/launchdarkly/dotnet-sdk-internal/issues/40)) ([3ab529d](https://github.com/launchdarkly/dotnet-sdk-internal/commit/3ab529d730fcbcc0fd5614d96997929b2e4644e1))

## [3.5.0](https://github.com/launchdarkly/dotnet-sdk-internal/compare/3.4.0...3.5.0) (2025-05-02)


### Features

* Inline context for custom and migrations op events ([#34](https://github.com/launchdarkly/dotnet-sdk-internal/issues/34)) ([7013bbe](https://github.com/launchdarkly/dotnet-sdk-internal/commit/7013bbe95b3be44ca277f311a84e195e1adfd41d))

## [3.4.0] - 2024-03-13
### Changed:
- Redact anonymous attributes within feature events
- Always inline contexts for feature events

## [3.3.1] - 2023-10-17
### Changed:
- Updated Dotnet Common to 7.0.0 which contains nullability of IEnvironmentReporter properties.

## [3.3.0] - 2023-10-10
### Changed:
- Updated LaunchDarkly.CommonSdk to 6.2.0 to incorporate changes.

## [3.2.0] - 2023-10-10
### Added:
- Add common support for technology migrations.
- HttpProperties now supports WithApplicationTags.

## [3.1.2] - 2023-04-21
### Changed:
- Updated `LaunchDarkly.CommonSdk` to `6.0.1`.

## [3.1.1] - 2023-03-08
### Fixed:
- Fixed an issue where calling `FlushAndWait` with `TimeSpan.Zero` would never complete if there were no events to flush.

## [3.1.0] - 2022-12-06
### Added:
- In `EventProcessor`, `FlushAndWait` and `FlushAndWaitAsync`.

## [3.0.0] - 2022-12-01
This major version release of `LaunchDarkly.InternalSdk` corresponds to the upcoming v7.0.0 release of the LaunchDarkly server-side .NET SDK (`LaunchDarkly.ServerSdk`) and the v3.0.0 release of the LaunchDarkly client-side .NET SDK (`LaunchDarkly.ClientSdk`), and cannot be used with earlier SDK versions.

### Changed:
- .NET Core 2.1, .NET Framework 4.5.2, .NET Framework 4.6.1, and .NET 5.0 are now unsupported. The minimum platform versions are now .NET Core 3.1, .NET Framework 4.6.2, .NET 6.0, and .NET Standard 2.0.
- Events now use the `Context` type rather than `User`.
- Private attributes can now be designated with the `AttributeRef` type, which allows redaction of either a full attribute or a property within a JSON object value.
- There is a new JSON schema for analytics events. The HTTP headers for event payloads now report the schema version as 4.
- There is no longer a dependency on `LaunchDarkly.JsonStream`. This package existed because some platforms did not support the `System.Text.Json` API, but that is no longer the case and the SDK now uses `System.Text.Json` directly for all of its JSON operations.
- `EventSender` now takes a byte array instead of a string for the event payload, so we can serialize JSON data directly to UTF8.

### Removed:
- All alias event functionality
- `EventsConfiguration.InlineUsersInEvents`

## [2.3.2] - 2022-02-02
### Changed:
- Updated `LaunchDarkly.CommonSdk` dependency to latest release.

## [2.3.1] - 2022-01-28
### Fixed:
- In analytics event data, `index` events were showing a `contextKind` property for anonymous users. That type of event should not have that property; LaunchDarkly would ignore it.

## [2.3.0] - 2021-10-27
### Added:
- `HttpProperties.NewHttpMessageHandler()`

## [2.2.0] - 2021-10-25
### Added:
- In `TaskExecutor`, there is a new parameter for controlling how events are dispatched that will be used by the client-side .NET SDK.
- In `LaunchDarkly.Sdk.Internal.Events`, new types `DiagnosticStoreBase` and `DiagnosticConfigProperties` contain logic that was previously only in `LaunchDarkly.ServerSdk` and will now be shared by `LaunchDarkly.ClientSdk`.

### Changed:
- Updated `LaunchDarkly.CommonSdk` to 5.4.0.

## [2.1.1] - 2021-10-05
### Changed:
- Updated dependency versions to keep in sync with dependencies of `LaunchDarkly.ServerSdk`.

## [2.1.0] - 2021-09-21
### Added:
- Made `StateMonitor` and `TaskExecutor` public; they had mistakenly been marked internal.

## [2.0.0] - 2021-09-21
### Added:
- `StateMonitor`, `TaskExecutor`.

### Changed:
- Moved `AtomicBoolean` and `AsyncUtils` into new namespace `LaunchDarkly.Sdk.Internal.Concurrent`.

### Removed:
- `MultiNotifier` (obviated by `StateMonitor`).

## [1.1.2] - 2021-06-07
### Fixed:
- Updated minimum `LaunchDarkly.CommonSdk` version to latest patch, to exclude versions of `LaunchDarkly.JsonStream` with a known parsing bug.

## [1.1.1] - 2021-05-07
### Fixed:
- `HttpProperties.ConnectTimeout` now really sets the TCP connect timeout, if the platform is .NET Core or .NET 5.0. Other platforms don't support connect timeouts and will continue to ignore this value.

## [1.1.0] - 2021-04-27
### Added:
- `UriExtensions`

### Fixed:
- Improved coverage and reliability of HTTP tests using `LaunchDarkly.TestHelpers`.

## [1.0.0] - 2021-02-08
Initial release of this package, to be used in `LaunchDarkly.ServerSdk` 6.0 and `LaunchDarkly.XamarinSdk` 2.0.
41 changes: 41 additions & 0 deletions pkgs/shared/internal/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to the LaunchDarkly SDK .NET Internal Common Code

LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.

## Submitting bug reports and feature requests

In general, issues should be filed in the issue trackers for the [.NET server-side SDK](https://github.com/launchdarkly/dotnet-server-sdk/issues) or the [Xamarin client-side SDK](https://github.com/launchdarkly/xamarin-client-sdk/issues) rather than in this repository, unless you have a specific implementation issue regarding the code in this repository.

## Submitting pull requests

We encourage pull requests and other contributions from the community. Before submitting pull requests, ensure that all temporary or unintended code is removed. Don't worry about adding reviewers to the pull request; the LaunchDarkly SDK team will add themselves. The SDK team will acknowledge all pull requests within two business days.

## Build instructions

### Prerequisites

To set up your build time environment, you must [download .NET and follow the instructions](https://dotnet.microsoft.com/download). Using the highest supported .NET version is recommended, since newer SDKs are capable of building for older target frameworks but not vice versa.

### Building

To install all required packages:

```
dotnet restore
```

Then, to build the library without running any tests:

```
dotnet build src/LaunchDarkly.InternalSdk
```

### Testing

To run all unit tests:

```
dotnet test test/LaunchDarkly.InternalSdk.Tests/LaunchDarkly.InternalSdk.Tests.csproj
```

Note that the unit tests can only be run in Debug configuration. There is an `InternalsVisibleTo` directive that allows the test code to access internal members of the library, and assembly strong-naming in the Release configuration interferes with this.
Binary file added pkgs/shared/internal/LaunchDarkly.InternalSdk.pk
Binary file not shown.
23 changes: 23 additions & 0 deletions pkgs/shared/internal/LaunchDarkly.InternalSdk.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.InternalSdk", "src\LaunchDarkly.InternalSdk.csproj", "{E9EA3EA1-D5CD-46CE-9E67-A8CDA4C292F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.InternalSdk.Tests", "test\LaunchDarkly.InternalSdk.Tests.csproj", "{DA1B9706-BD2B-4956-8074-3B4686C008AB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E9EA3EA1-D5CD-46CE-9E67-A8CDA4C292F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9EA3EA1-D5CD-46CE-9E67-A8CDA4C292F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9EA3EA1-D5CD-46CE-9E67-A8CDA4C292F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9EA3EA1-D5CD-46CE-9E67-A8CDA4C292F0}.Release|Any CPU.Build.0 = Release|Any CPU
{DA1B9706-BD2B-4956-8074-3B4686C008AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA1B9706-BD2B-4956-8074-3B4686C008AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA1B9706-BD2B-4956-8074-3B4686C008AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA1B9706-BD2B-4956-8074-3B4686C008AB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Loading
Loading