Skip to content

Commit

Permalink
Fix api/standard constant names and documentation (#920)
Browse files Browse the repository at this point in the history
* Update spec version sem-conv implement in doc.go

* Update FaaS key const names to match convention

* Add PR number to Changelog
  • Loading branch information
MrAlias authored Jul 9, 2020
1 parent cf6462c commit fab431e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
Preference is given to Single Header encoding with Multiple Header being the fallback if Single Header is not found or is invalid.
This behavior change is made to dynamically support all correctly encoded traces received instead of having to guess the expected encoding prior to receiving. (#882)
- Extend semantic conventions for RPC. (#900)
- To match constant naming conventions in the `api/standard` package, the `FaaS*` key names are appended with a suffix of `Key`. (#920)
- `"api/standard".FaaSName` -> `FaaSNameKey`
- `"api/standard".FaaSID` -> `FaaSIDKey`
- `"api/standard".FaaSVersion` -> `FaaSVersionKey`
- `"api/standard".FaaSInstance` -> `FaaSInstanceKey`

### Removed

Expand Down
6 changes: 3 additions & 3 deletions api/standard/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// use in OpenTelemetry. These standardizations are specified in the
// OpenTelemetry specification:
//
// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.4.0/specification/resource/semantic_conventions
// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.4.0/specification/trace/semantic_conventions
// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.4.0/specification/metrics/semantic_conventions
// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.6.0/specification/resource/semantic_conventions
// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.6.0/specification/trace/semantic_conventions
// - https://github.com/open-telemetry/opentelemetry-specification/tree/v0.6.0/specification/metrics/semantic_conventions
package standard
8 changes: 4 additions & 4 deletions api/standard/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ const (
// Standard Function-as-a-Service resource attribute keys.
const (
// A uniquely identifying name for the FaaS.
FaaSName = kv.Key("faas.name")
FaaSNameKey = kv.Key("faas.name")

// The unique name of the function being executed.
FaaSID = kv.Key("faas.id")
FaaSIDKey = kv.Key("faas.id")

// The version of the function being executed.
FaaSVersion = kv.Key("faas.version")
FaaSVersionKey = kv.Key("faas.version")

// The execution environment identifier.
FaaSInstance = kv.Key("faas.instance")
FaaSInstanceKey = kv.Key("faas.instance")
)

// Standard Kubernetes resource attribute keys.
Expand Down

0 comments on commit fab431e

Please sign in to comment.