-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement otel tracing hook. (#130)
Adds the otel hook. Adds a workspace. Before using the workspace you need to: ``` make workspace ``` --------- Co-authored-by: Casey Waldren <[email protected]>
- Loading branch information
1 parent
3c946ce
commit f5675c1
Showing
18 changed files
with
659 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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,37 @@ | ||
--- | ||
name: Bug report for the ldotel module | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: 'ldotel, enhancement' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is this a support request?** | ||
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/hc/en-us/requests/new) or by emailing [email protected]. | ||
|
||
Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above. | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To reproduce** | ||
Steps to reproduce the behavior. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Logs** | ||
If applicable, add any log output related to your problem. | ||
|
||
**SDK version** | ||
The version of this SDK that you are using. | ||
|
||
**Language version, developer tools** | ||
For instance, Go 1.22. | ||
|
||
**OS/platform** | ||
For instance, Ubuntu 16.04, or Windows 10. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains 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 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 @@ | ||
--- | ||
name: Feature request for the ldotel module | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: 'ldotel, enhancement' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context about the feature request here. |
This file contains 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 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 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and Test | ||
name: Build and Test SDK | ||
on: | ||
push: | ||
branches: [ 'v7', 'feat/**' ] | ||
|
This file contains 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 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 @@ | ||
name: Build and Test ldotel | ||
on: | ||
push: | ||
branches: [ 'v7', 'feat/**' ] | ||
paths-ignore: | ||
- '**.md' # Don't run CI on markdown changes. | ||
pull_request: | ||
branches: [ 'v7', 'feat/**' ] | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
go-versions: | ||
uses: ./.github/workflows/go-versions.yml | ||
|
||
# Runs the common tasks (unit tests, lint, contract tests) for each Go version. | ||
test-linux: | ||
name: ${{ format('ldotel Linux, Go {0}', matrix.go-version) }} | ||
needs: go-versions | ||
strategy: | ||
# Let jobs fail independently, in case it's a single version that's broken. | ||
fail-fast: false | ||
matrix: | ||
go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go ${{ inputs.go-version }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- uses: ./.github/actions/unit-tests | ||
with: | ||
lint: 'true' | ||
test-target: ldotel-test | ||
- uses: ./.github/actions/coverage | ||
with: | ||
enforce: 'false' |
This file contains 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 |
---|---|---|
|
@@ -4,3 +4,5 @@ go-server-sdk.test | |
allocations.out | ||
.idea | ||
.vscode | ||
go.work | ||
go.work.sum |
This file contains 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 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 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,54 @@ | ||
LaunchDarkly Server-side OTEL library for Go | ||
============================================== | ||
[![Actions Status](https://github.com/launchdarkly/go-server-sdk/actions/workflows/ldotel-ci.yml/badge.svg?branch=v7)](https://github.com/launchdarkly/go-server-sdk/actions/workflows/ci.yml) | ||
|
||
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! | ||
|
||
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly) | ||
|
||
Getting started | ||
----------- | ||
|
||
Import the module: | ||
|
||
```go | ||
import ( | ||
"github.com/launchdarkly/go-server-sdk/ldotel" | ||
) | ||
``` | ||
|
||
Configure the LaunchDarkly client to use a tracing hook: | ||
|
||
```go | ||
client, _ = ld.MakeCustomClient("your-sdk-key", | ||
ld.Config{ | ||
Hooks: []ldhooks.Hook{ldotel.NewTracingHook()}, | ||
}, 5*time.Second) | ||
``` | ||
|
||
Learn more | ||
----------- | ||
|
||
Read our [documentation](http://docs.launchdarkly.com) for in-depth instructions on configuring and using 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 library. | ||
|
||
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. Read [our documentation](https://docs.launchdarkly.com/sdk) 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 | ||
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates |
Oops, something went wrong.