-
Notifications
You must be signed in to change notification settings - Fork 2
chore: Scaffold dotnet plugin project. #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a61fabe
chore: Scaffold dotnet plugin project.
kinyoklion bbb61dc
Add dotnet setup step and correct working directory.
kinyoklion 7bb9496
Explicit permissions.
kinyoklion f694eb1
Reformat workflow file.
kinyoklion f9544cd
Add project reference to implementation from tests.
kinyoklion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: .NET ObservabilityPlugin | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: ['main'] | ||
| pull_request: | ||
| branches: ['main'] | ||
| paths: | ||
| - 'sdk/@launchdarkly/observability-dotnet/**' | ||
| - '.github/workflows/dotnet-plugin.yml' | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 | ||
| with: | ||
| dotnet-version: '8.0.x' | ||
|
|
||
| - run: dotnet restore | ||
| working-directory: sdk/@launchdarkly/observability-dotnet | ||
|
|
||
| - run: dotnet build --no-restore | ||
| working-directory: sdk/@launchdarkly/observability-dotnet | ||
|
|
||
| - run: dotnet test --no-restore | ||
| working-directory: sdk/@launchdarkly/observability-dotnet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| **/bin | ||
| **/obj |
33 changes: 33 additions & 0 deletions
33
sdk/@launchdarkly/observability-dotnet/LaunchDarkly.Observability.sln
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 17 | ||
| VisualStudioVersion = 17.0.31903.59 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.Observability", "src\LaunchDarkly.Observability\LaunchDarkly.Observability.csproj", "{EFEF5623-E551-4085-AB85-1711BD6EA731}" | ||
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LaunchDarkly.Observability.Tests", "test\LaunchDarkly.Observability.Tests\LaunchDarkly.Observability.Tests.csproj", "{85022F8E-D264-44F4-A8AF-1117D8202FBD}" | ||
| EndProject | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{25034066-05A5-47F9-9FF3-9213B17E689C}" | ||
| ProjectSection(SolutionItems) = preProject | ||
| README.md = README.md | ||
| EndProjectSection | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {EFEF5623-E551-4085-AB85-1711BD6EA731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {EFEF5623-E551-4085-AB85-1711BD6EA731}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {EFEF5623-E551-4085-AB85-1711BD6EA731}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {EFEF5623-E551-4085-AB85-1711BD6EA731}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {85022F8E-D264-44F4-A8AF-1117D8202FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {85022F8E-D264-44F4-A8AF-1117D8202FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {85022F8E-D264-44F4-A8AF-1117D8202FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {85022F8E-D264-44F4-A8AF-1117D8202FBD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| EndGlobal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| LaunchDarkly Observability Plugin for .Net | ||
| =========================== | ||
|
|
||
| [//]: # (These can be uncommented once the links are live.) | ||
| [//]: # ([![Actions Status][dotnetplugin-sdk-ci-badge]][dotnetplugin-sdk-ci]) | ||
| [//]: # ([][o11y-docs-link]) | ||
| [//]: # ([![NuGet][dotnetplugin-nuget-badge]][dotnetplugin-nuget-link]) | ||
|
|
||
| # Early Access Preview️ | ||
|
|
||
| **NB: APIs are subject to change until a 1.x version is released.** | ||
|
|
||
| ## Install | ||
|
|
||
| ```shell | ||
| dotnet add package LaunchDarkly.Observability | ||
| ``` | ||
|
|
||
| Install the plugin when configuring your LaunchDarkly SDK. | ||
|
|
||
| ```csharp | ||
| // TODO: Add example. | ||
| ``` | ||
|
|
||
| LaunchDarkly overview | ||
| ------------------------- | ||
| [LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves trillions of feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/home/getting-started) using LaunchDarkly today! | ||
|
|
||
| [](https://twitter.com/intent/follow?screen_name=launchdarkly) | ||
|
|
||
| ## Contributing | ||
|
|
||
| We encourage pull requests and other contributions from the community. Check out our [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute to this SDK. | ||
|
|
||
| ## About LaunchDarkly | ||
|
|
||
| * LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can: | ||
| * Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases. | ||
| * Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?). | ||
| * Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file. | ||
| * Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline. | ||
| * LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list. | ||
| * Explore LaunchDarkly | ||
| * [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information | ||
| * [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides | ||
| * [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation | ||
| * [launchdarkly.com/blog](https://launchdarkly.com/blog/ "LaunchDarkly Blog Documentation") for the latest product updates | ||
|
|
||
| [dotnetplugin-sdk-ci-badge]: https://github.com/launchdarkly/observability-sdk/actions/workflows/dotnet-plugin.yml/badge.svg | ||
| [dotnetplugin-sdk-ci]: https://github.com/launchdarkly/observability-sdk/actions/workflows/dotnet-plugin.yml | ||
| [o11y-docs-link]: https://launchdarkly.github.io/observability-sdk/sdk/@launchdarkly/observability-dotnet/ | ||
| [dotnetplugin-nuget-badge]: https://img.shields.io/nuget/v/LaunchDarkly.Observability.svg?style=flat-square | ||
| [dotnetplugin-nuget-link]: https://www.nuget.org/packages/LaunchDarkly.Observability/ |
7 changes: 7 additions & 0 deletions
7
sdk/@launchdarkly/observability-dotnet/src/LaunchDarkly.Observability/Class1.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| namespace LaunchDarkly.Observability | ||
| { | ||
| public class Class1 | ||
| { | ||
|
|
||
| } | ||
| } |
38 changes: 38 additions & 0 deletions
38
...kly/observability-dotnet/src/LaunchDarkly.Observability/LaunchDarkly.Observability.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <!--x-release-please-start-version--> | ||
| <Version>0.0.0</Version> | ||
| <!--x-release-please-end--> | ||
| <Nullable>disable</Nullable> | ||
| <!-- The BUILDFRAMEWORKS variable allows us to override the target frameworks with a | ||
| single framework that we are testing; this allows us to test with older SDK | ||
| versions that would error out if they saw any newer target frameworks listed | ||
| here, even if we weren't running those. --> | ||
| <BuildFrameworks Condition="'$(BUILDFRAMEWORKS)' == ''">netstandard2.0;net471;net8.0</BuildFrameworks> | ||
| <TargetFrameworks>$(BUILDFRAMEWORKS)</TargetFrameworks> | ||
| <LangVersion>7.3</LangVersion> | ||
|
|
||
| <Description>LaunchDarkly Observability for Server-Side .NET SDK</Description> | ||
| <Authors>LaunchDarkly</Authors> | ||
| <Owners>LaunchDarkly</Owners> | ||
| <Company>LaunchDarkly</Company> | ||
| <Copyright>Copyright 2025 Catamorphic, Co</Copyright> | ||
| <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
| <PackageProjectUrl>https://github.com/launchdarkly/observability-sdk</PackageProjectUrl> | ||
| <RepositoryUrl>https://github.com/launchdarkly/observability-sdk</RepositoryUrl> | ||
|
|
||
| <!-- fail if XML comments are missing or invalid --> | ||
| <WarningsAsErrors>1570,1571,1572,1573,1574,1580,1581,1584,1591,1710,1711,1712</WarningsAsErrors> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Allow the testing project to access internals. --> | ||
| <ItemGroup Condition="'$(Configuration)'!='Release'"> | ||
| <InternalsVisibleTo Include="LaunchDarkly.Observability.Tests" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(Configuration)'=='Release' And '$(SKIP_SIGNING)'!='true'"> | ||
| <AssemblyOriginatorKeyFile>../../../../../LaunchDarkly.snk</AssemblyOriginatorKeyFile> | ||
| <SignAssembly>true</SignAssembly> | ||
| </PropertyGroup> | ||
| </Project> |
20 changes: 20 additions & 0 deletions
20
...lity-dotnet/test/LaunchDarkly.Observability.Tests/LaunchDarkly.Observability.Tests.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <Nullable>disable</Nullable> | ||
|
|
||
| <IsPackable>false</IsPackable> | ||
| <IsTestProject>true</IsTestProject> | ||
| <RootNamespace>LaunchDarkly.Observability.Test</RootNamespace> | ||
| <LangVersion>7.3</LangVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="coverlet.collector" Version="6.0.0"/> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/> | ||
| <PackageReference Include="NUnit" Version="3.14.0"/> | ||
| <PackageReference Include="NUnit.Analyzers" Version="3.9.0"/> | ||
| <PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/> | ||
| </ItemGroup> | ||
| </Project> | ||
18 changes: 18 additions & 0 deletions
18
sdk/@launchdarkly/observability-dotnet/test/LaunchDarkly.Observability.Tests/UnitTest1.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| using NUnit.Framework; | ||
|
|
||
| namespace LaunchDarkly.Observability.Test | ||
| { | ||
| public class Tests | ||
| { | ||
| [SetUp] | ||
| public void Setup() | ||
| { | ||
| } | ||
|
|
||
| [Test] | ||
| public void Test1() | ||
| { | ||
| Assert.Pass(); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.