Skip to content

Commit df815a6

Browse files
authored
chore: update project id constants (#358)
## Summary Add extra constants for LD attribute extraction. ## How did you test this change? <!-- Frontend - Leave a screencast or a screenshot to visually describe the changes. --> ## Are there any deployment considerations? <!-- Backend - Do we need to consider migrations or backfilling data? --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Constant-only changes; main risk is downstream integrations depending on the old `X-LaunchDarkly-Project` header casing or different attribute names. > > **Overview** > Updates Go OTEL constants to better support LaunchDarkly project identification: normalizes `LDProjectIDHeader` to lowercase (`x-launchdarkly-project`) and adds a new `LDProjectIDAttribute` (`launchdarkly.project_id`) alongside the existing Highlight attribute. > > Reintroduces explicit *deprecated* constants for legacy Highlight/session/trace/source keys (`highlight_project_id`, `highlight_session_id`, `highlight_trace_id`, `Source`) while keeping the canonical `highlight.*` attributes unchanged, enabling backward-compatible extraction paths. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 498330e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 5663977 commit df815a6

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

sdk/highlight-go/otel.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,22 @@ const OTLPDefaultEndpoint = "https://otel.highlight.io:4318"
3434

3535
const ErrorURLAttribute = "URL"
3636

37+
const LDProjectIDHeader = "x-launchdarkly-project"
3738
const ProjectIDHeader = "x-highlight-project"
38-
const LDProjectIDHeader = "X-LaunchDarkly-Project"
39-
const DeprecatedProjectIDAttribute = "highlight_project_id"
40-
const DeprecatedSessionIDAttribute = "highlight_session_id"
41-
const DeprecatedRequestIDAttribute = "highlight_trace_id"
42-
const DeprecatedSourceAttribute = "Source"
39+
40+
const LDProjectIDAttribute = "launchdarkly.project_id"
4341
const ProjectIDAttribute = "highlight.project_id"
42+
const DeprecatedProjectIDAttribute = "highlight_project_id"
43+
4444
const SessionIDAttribute = "highlight.session_id"
45+
const DeprecatedSessionIDAttribute = "highlight_session_id"
46+
4547
const RequestIDAttribute = "highlight.trace_id"
48+
const DeprecatedRequestIDAttribute = "highlight_trace_id"
49+
4650
const SourceAttribute = "highlight.source"
51+
const DeprecatedSourceAttribute = "Source"
52+
4753
const TraceTypeAttribute = "highlight.type"
4854
const TraceKeyAttribute = "highlight.key"
4955
const EnvironmentAttribute = "environment"

0 commit comments

Comments
 (0)