census-instrumentation / opencensus-go

A stats collection and distributed tracing framework
http://opencensus.io
Apache License 2.0
2.05k stars 327 forks source link

Add SetPath method to ochttp package #1286

Closed ghost closed 1 year ago

ghost commented 1 year ago

I am faced with the problem that metrics can take up a large size. After analyzing them, I found a large number of metrics of the form.
GET http_path=/a/d22a92ac-49d4-4926-bdcc-a56658159b4d.
GET http_path=/a/78ac4c27-38ed-45af-b2a0-8dcb91586323.
GET http_path=/a/0da797f8-cba0-4980-9cf7-5830fa5040df.

These are the same endpoint, but different entity IDs.
My PR suggests setting aliases in the http_path by calling the Set Path method.
After calling the method, I see only one line with the endpoint call.
GET http_path=/a/:id.

Thanks!

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

dashpole commented 1 year ago

Hey @farexw, unfortunately the project is in maintenance right now, and we aren't accepting new features. The OpenTelemetry project recently added metric instrumentation to the otelhttp instrumentation package, and may be more receptive to new features.

ghost commented 1 year ago

Hey @farexw, unfortunately the project is in maintenance right now, and we aren't accepting new features. The OpenTelemetry project recently added metric instrumentation to the otelhttp instrumentation package, and may be more receptive to new features.

I got it, thanks.