Skip to content
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

opentelemetry: clarify otel.kind field usage in docs #1218

Merged
merged 1 commit into from Jan 30, 2021

Conversation

jtescher
Copy link
Collaborator

This patch resolves the field value capitalization ambiguity currently in otel.kind by instead recommending an enum value. This also brings type safety to the value, further reducing the risk of typos and other misuse.

Resolves #1209

This patch resolves the field value capitalization ambiguity currently
in `otel.kind` by instead recommending an enum value. This also brings
type safety to the value, further reducing the risk of typos and other
misuse.
@jtescher jtescher added the crate/opentelemetry Related to the `tracing-opentelemetry` crate. label Jan 30, 2021
@jtescher jtescher requested a review from a team as a code owner January 30, 2021 04:56
//!
//! ### Semantic Conventions
//!
//! OpenTelemetry defines conventional names for attributes of common
//! operations. These names can be assigned directly as fields, e.g.
//! `trace_span!("request", "otel.kind" = "client", "http.url" = ..)`, and they
//! `trace_span!("request", "otel.kind" = %SpanKind::Client, "http.url" = ..)`, and they
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit/TIOLI: it might be worth changing this example so that it's formatted as Rust code? but we can do that later.

@hawkw hawkw merged commit f05a0f2 into master Jan 30, 2021
@jtescher jtescher deleted the jtescher/otel-span-kind-docs branch January 31, 2021 18:06
hawkw pushed a commit that referenced this pull request Feb 4, 2021
This patch resolves the field value capitalization ambiguity currently
in `otel.kind` by instead recommending an enum value. This also brings
type safety to the value, further reducing the risk of typos and other
misuse.

Resolves #1209
@hawkw hawkw mentioned this pull request Feb 4, 2021
hawkw pushed a commit that referenced this pull request Feb 4, 2021
This patch resolves the field value capitalization ambiguity currently
in `otel.kind` by instead recommending an enum value. This also brings
type safety to the value, further reducing the risk of typos and other
misuse.

Resolves #1209
@hamiltop
Copy link

The Display implementation for SpanKind has been moved in the latest opentelemetry::trace::SpanKind code: open-telemetry/opentelemetry-rust#758

Building against opentelemetry-0.17.2 is fine, but I just wanted to share that this will break the examples in the readme at some point.

fnichol added a commit to systeminit/si that referenced this pull request Sep 20, 2022
Some notable changes:

- Upgrade to latest tracing/openteletetry dependencies:
  - opentelemetry 0.18.0
  - opentelemetry-otlp 0.11.0
  - opentelemetry-semantic-conventions 0.10.0
  - tracing-opentelemetry 0.18.0
- Due to updates in opentelemetry-api dropping some Display trait
  implementations some changes had to be made to preserve the string
  representations (in one case static strings is used, and in another
  case a wrapping unit type is used to ship a similar Display impl)

References: open-telemetry/opentelemetry-rust#758
References: tokio-rs/tracing#1218

Signed-off-by: Fletcher Nichol <fletcher@systeminit.com>
fnichol added a commit to systeminit/si that referenced this pull request Sep 20, 2022
Some notable changes:

- Upgrade to latest tracing/openteletetry dependencies:
  - opentelemetry 0.18.0
  - opentelemetry-otlp 0.11.0
  - opentelemetry-semantic-conventions 0.10.0
  - tracing-opentelemetry 0.18.0
- Due to updates in opentelemetry-api dropping some Display trait
  implementations some changes had to be made to preserve the string
  representations (in one case static strings is used, and in another
  case a wrapping unit type is used to ship a similar Display impl)

References: open-telemetry/opentelemetry-rust#758
References: tokio-rs/tracing#1218

Signed-off-by: Fletcher Nichol <fletcher@systeminit.com>
si-bors-ng bot added a commit to systeminit/si that referenced this pull request Sep 21, 2022
1295: build(deps): update Rust dependencies (2022-W39) r=nickgerace a=fnichol

Some notable changes:

- Upgrade to latest tracing/openteletetry dependencies:
  - opentelemetry 0.18.0
  - opentelemetry-otlp 0.11.0
  - opentelemetry-semantic-conventions 0.10.0
  - tracing-opentelemetry 0.18.0
- Due to updates in opentelemetry-api dropping some Display trait
  implementations some changes had to be made to preserve the string
  representations (in one case static strings is used, and in another
  case a wrapping unit type is used to ship a similar Display impl)
- The `protoc` (i.e. Protobuf compiler) is now required on build/ci/development
  systems due to updates with the tonic Rust crate

References: open-telemetry/opentelemetry-rust#758
References: tokio-rs/tracing#1218

Co-authored-by: Fletcher Nichol <fletcher@systeminit.com>
fnichol added a commit to systeminit/si that referenced this pull request Sep 21, 2022
Some notable changes:

- Upgrade to latest tracing/openteletetry dependencies:
  - opentelemetry 0.18.0
  - opentelemetry-otlp 0.11.0
  - opentelemetry-semantic-conventions 0.10.0
  - tracing-opentelemetry 0.18.0
- Due to updates in opentelemetry-api dropping some Display trait
  implementations some changes had to be made to preserve the string
  representations (in one case static strings is used, and in another
  case a wrapping unit type is used to ship a similar Display impl)

References: open-telemetry/opentelemetry-rust#758
References: tokio-rs/tracing#1218

Signed-off-by: Fletcher Nichol <fletcher@systeminit.com>
si-bors-ng bot added a commit to systeminit/si that referenced this pull request Sep 21, 2022
1295: build(deps): update Rust dependencies (2022-W39) r=fnichol a=fnichol

Some notable changes:

- Upgrade to latest tracing/openteletetry dependencies:
  - opentelemetry 0.18.0
  - opentelemetry-otlp 0.11.0
  - opentelemetry-semantic-conventions 0.10.0
  - tracing-opentelemetry 0.18.0
- Due to updates in opentelemetry-api dropping some Display trait
  implementations some changes had to be made to preserve the string
  representations (in one case static strings is used, and in another
  case a wrapping unit type is used to ship a similar Display impl)
- The `protoc` (i.e. Protobuf compiler) is now required on build/ci/development
  systems due to updates with the tonic Rust crate

References: open-telemetry/opentelemetry-rust#758
References: tokio-rs/tracing#1218

Co-authored-by: Fletcher Nichol <fletcher@systeminit.com>
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
This patch resolves the field value capitalization ambiguity currently
in `otel.kind` by instead recommending an enum value. This also brings
type safety to the value, further reducing the risk of typos and other
misuse.

Resolves tokio-rs#1209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/opentelemetry Related to the `tracing-opentelemetry` crate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tracing-opentelemetry: Docs for otel.kind are unclear about capitalisation
3 participants