Skip to content

Metric instrumentation asgi#1197

Merged
srikanthccv merged 21 commits intoopen-telemetry:mainfrom
TheAnshul756:metric-instrumentation-asgi
Aug 8, 2022
Merged

Metric instrumentation asgi#1197
srikanthccv merged 21 commits intoopen-telemetry:mainfrom
TheAnshul756:metric-instrumentation-asgi

Conversation

@TheAnshul756
Copy link
Copy Markdown
Contributor

Description

Fixes #1160

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

  • tox -e test-instrumentation-asgi

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
  • Unit tests have been added

@TheAnshul756 TheAnshul756 requested a review from a team July 19, 2022 11:05
@lzchen lzchen mentioned this pull request Jul 20, 2022
6 tasks
Copy link
Copy Markdown
Contributor

@lzchen lzchen left a comment

Choose a reason for hiding this comment

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

Can we test out the values?

self.assertEqual(len(data_points), 1)
for point in data_points:
if isinstance(point, HistogramDataPoint):
self.assertEqual(point.count, 3)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we test out the values?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see that the same test from the WSGI metrics instrumentation style is copied for writing tests everywhere. I would like to see the actual values as well with more tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added test to check the attributes values. Please have a look.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not referring to the values of the attributes. I am referring to the values of the data points recorded in the data points. Like sum for histogram data point and value for number data point. We are trying to verify that the duration and number of requests recorded are what we expect.

@srikanthccv srikanthccv merged commit cbf005b into open-telemetry:main Aug 8, 2022
shalevr pushed a commit to shalevr/opentelemetry-python-contrib that referenced this pull request Aug 8, 2022
…hub.com/shalevr/opentelemetry-python-contrib into feature/Metrics-instrumentation-urllib3

* 'feature/Metrics-instrumentation-urllib3' of https://github.com/shalevr/opentelemetry-python-contrib:
  Metric instrumentation asgi (open-telemetry#1197)
  Metrics instrumentation flask (open-telemetry#1186)
  Adding sqlalchemy native tags in sqlalchemy commenter (open-telemetry#1206)
shalevr pushed a commit to shalevr/opentelemetry-python-contrib that referenced this pull request Aug 30, 2022
* main:
  Codespell ci (open-telemetry#1237)
  aiohttp-client: Fix producing additional spans with each newly created ClientSession (open-telemetry#1246)
  Remove support for 3.6 (open-telemetry#853)
  Added the Licence and Manifest file
  Restore metrics in django (open-telemetry#1208)
  fix typo in example codes (open-telemetry#1240)
  boto3sqs: Make propagation compatible with other instrumentations and add 'messaging.url' span attribute (open-telemetry#1234)
  Release 1.12.0-0.33b0 (open-telemetry#1223)
  Fix Flask instrumentation doc link (open-telemetry#1216)
  Feature/metrics instrumentation urllib3 (open-telemetry#1198)
  Metric instrumentation asgi (open-telemetry#1197)
  Metrics instrumentation flask (open-telemetry#1186)
  Adding sqlalchemy native tags in sqlalchemy commenter (open-telemetry#1206)
  ci: fix docs workflow failure (open-telemetry#1211)
  Add psycopg2 native tags to sqlcommenter (open-telemetry#1203)
  SQLCommenter semicolon bug fix (open-telemetry#1200)
  Sync with sdk setup from setUpClass to setUp (open-telemetry#1193)

# Conflicts:
#	CHANGELOG.md
#	instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py
#	instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py
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.

Metrics instrumentation asgi

5 participants