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

Update description of active requests counter for Django and aiohttp #2514

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ async def middleware(request, handler):
active_requests_counter = meter.create_up_down_counter(
name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS,
unit="requests",
description="measures the number of concurrent HTTP requests those are currently in flight",
description="measures the number of concurrent HTTP requests that are currently in-flight",
Copy link
Member

Choose a reason for hiding this comment

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

@lmolkova updated the semantic convention package in open-telemetry/opentelemetry-python#3586 to generate instrument creation factories we could use here

@lmolkova would you recommend updating here to use create_http_server_active_requests()?

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, that would be great! if you see any issues/opportunities to improve, lmk, happy to update helpers.

Copy link
Member

Choose a reason for hiding this comment

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

@dkliban could you update the PR to use this function for instrument creation?

Copy link
Author

Choose a reason for hiding this comment

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

i'll try to do that. i haven't seen it actually used anywhere yet.

Copy link
Member

Choose a reason for hiding this comment

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

That's right, we are using the instrument creation factories now for the migration to the new semconv. At this point, we didn't include aiohttp-server in the list of instrumentation to migrate to the new semconv, but I think it's important since we can release the package now.

)

with tracer.start_as_current_span(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def _instrument(self, **kwargs):
_DjangoMiddleware._active_request_counter = meter.create_up_down_counter(
name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS,
unit="requests",
description="measures the number of concurrent HTTP requests those are currently in flight",
description="measures the number of concurrent HTTP requests that are currently in-flight",
)
# This can not be solved, but is an inherent problem of this approach:
# the order of middleware entries matters, and here you have no control
Expand Down
Loading