open-feature / open-feature/go-sdk

Use OTel semconv package instead of consts

Open
#393 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
250
Forks
62
Avg merge
2d 3h
Merged PRs (30d)
25

Description

The telemetry package should probably use the OTel semconv package for the consts below. The benefit of doing so is that updates to the semconv would generally require minimal changes to the telemetry package. Since the constants are already defined there, it does not make sense to redefine them in the telemetry package.

See the consts defined under the "feature_flag" namespace: https://pkg.go.dev/go.opentelemetry.io/otel@v1.37.0/semconv/v1.34.0#section-readme:~:text=Namespace%3A%20feature_flag

https://github.com/open-feature/go-sdk/blob/d7174f73db903064b8170007c2a347b727379cab/openfeature/telemetry/telemetry.go#L27-L36

Contributor guide

Open the contributing guide

Research direction

Start in openfeature/telemetry/telemetry.go, especially the constants referenced around lines 27–36, and compare them with the OpenTelemetry semconv feature_flag namespace. Replace the duplicated definitions with the corresponding semconv constants, then verify that the telemetry package still builds and its existing behavior is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.