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

make span attribute available to urllib #1014

Merged
merged 7 commits into from
Apr 12, 2022

Conversation

DiptoChakrabarty
Copy link
Contributor

@DiptoChakrabarty DiptoChakrabarty commented Mar 21, 2022

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #938

Type of change

Makes use of span attribute in the urllib instrumentation

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated

@DiptoChakrabarty DiptoChakrabarty requested a review from a team March 21, 2022 06:40
CHANGELOG.md Outdated
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `opentelemetry-instrumentation-urllib` make spam attribute available to urllib
Copy link
Member

@srikanthccv srikanthccv Mar 21, 2022

Choose a reason for hiding this comment

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

Suggested change
- `opentelemetry-instrumentation-urllib` make spam attribute available to urllib
- `opentelemetry-instrumentation-urllib` make span attributes available to sampler

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -183,15 +183,17 @@ def _instrumented_open_call(
SpanAttributes.HTTP_URL: url,
}

span_attributes = {
Copy link
Contributor

@lzchen lzchen Mar 21, 2022

Choose a reason for hiding this comment

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

There is already a dict with the exact same fields called labels right above. Maybe we can just use that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed it , I thought we needed a new dict for span attributes

@srikanthccv srikanthccv requested a review from ocelotl April 6, 2022 15:05
@srikanthccv
Copy link
Member

@DiptoChakrabarty Please resolve the conflicts.

@srikanthccv srikanthccv merged commit e9f83e1 into open-telemetry:main Apr 12, 2022
@lzchen lzchen mentioned this pull request May 25, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opentelemetry-instrumentation-urllib
4 participants