Skip to content

Comments

fix(opentelemetry): fix Span.kind property to return SpanKind instead of str#13159

Closed
przlada wants to merge 10 commits intoDataDog:mainfrom
przlada:fix-opentelemetry-span-kind
Closed

fix(opentelemetry): fix Span.kind property to return SpanKind instead of str#13159
przlada wants to merge 10 commits intoDataDog:mainfrom
przlada:fix-opentelemetry-span-kind

Conversation

@przlada
Copy link

@przlada przlada commented Apr 10, 2025

I found that the Span.kind property from the OpenTelemetry integration is returning a string value instead of a SpanKind enum. Because of this, the logic for setting the operation name cannot work properly

I propose to merge these changes as they:

  • Fix the Span.kind property to return the SpanKind enum as it should, instead of a string value
  • Thanks to this fix, the Span._datadog_operation_name property will start to work properly (as it is comparing to SpanKind enum values). I also fixed the logic for when the network.protocol.name attribute is set
  • I added tests to validate that span names are properly set now, and updated some snapshot files

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@przlada przlada marked this pull request as ready for review April 10, 2025 20:37
@przlada przlada requested review from a team as code owners April 10, 2025 20:37
@rachelyangdog rachelyangdog requested a review from mabdinur April 14, 2025 13:30
@przlada przlada force-pushed the fix-opentelemetry-span-kind branch from ede0c76 to d25236d Compare April 16, 2025 21:41
@mabdinur mabdinur changed the title OpenTelemetry - fix Span.kind property to return SpanKind instead of str fix(opentelemetry): fix Span.kind property to return SpanKind instead of str Apr 16, 2025
@mabdinur mabdinur enabled auto-merge (squash) April 16, 2025 22:01
@przlada
Copy link
Author

przlada commented Apr 17, 2025

Is there anything more I can or should do before this PR can be approved for running test workflows in CI? Everything is passing in my local environment, but it would be great to ensure I haven't overlooked anything

@cit-pr-commenter
Copy link

PR Security Update

All commits in this PR up to and including 4f0d30d have been reviewed and marked safe by SDLC security. For any questions, please reach out to #ci-for-external-contributors-collab on Slack.

@bm1549 bm1549 removed the request for review from rachelyangdog May 28, 2025 14:27
@github-actions github-actions bot added the stale label Jun 28, 2025
@github-actions
Copy link
Contributor

This pull request has been automatically closed after a period of inactivity.
After this much time, it will likely be easier to open a new pull request with the
same changes than to update this one from the base branch. Please comment or reopen
if you think this pull request was closed in error.

@github-actions github-actions bot closed this Jun 29, 2025
auto-merge was automatically disabled June 29, 2025 00:09

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants