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

[telemetry] - It would be great to have addtitional metrics #9412

Open
VihasMakwana opened this issue Jan 19, 2024 · 8 comments · May be fixed by #10084
Open

[telemetry] - It would be great to have addtitional metrics #9412

VihasMakwana opened this issue Jan 19, 2024 · 8 comments · May be fixed by #10084
Labels
collector-telemetry healthchecker and other telemetry collection issues enhancement New feature or request waiting-for-author

Comments

@VihasMakwana
Copy link
Contributor

Component(s)

No response

Is your feature request related to a problem? Please describe.

We currently have some metrics exposed via ObsReport, such as:
refusedLogRecords, droppedLogRecords etc.

However, these don't consider the body's size(in bytes).
Such metrics can provide another perspective regarding collector's capabilities for various users.

Describe the solution you'd like

Expose some additional metrics.
We can enable this via the feature gate

Describe alternatives you've considered

None yet.

Additional context

No response

@VihasMakwana VihasMakwana added the enhancement New feature or request label Jan 19, 2024
@crobert-1 crobert-1 added the collector-telemetry healthchecker and other telemetry collection issues label Jan 25, 2024
@VihasMakwana
Copy link
Contributor Author

@open-telemetry/collector-contrib-approvers can you share your thoughts? I can roll out a draft PR soon.

@djaglowski
Copy link
Member

the body's size(in bytes)

How will the size be defined when it is not a string?

What other metrics are you proposing?

@TylerHelmuth TylerHelmuth transferred this issue from open-telemetry/opentelemetry-collector-contrib Jan 29, 2024
@TylerHelmuth
Copy link
Member

This feels like it belongs in Core, gonna transfer it there

@VihasMakwana
Copy link
Contributor Author

As per

the body's size(in bytes)

How will the size be defined when it is not a string?

What other metrics are you proposing?

I see, as per https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-body it can any.
For calculating the size of such cases, there are multiple ways:

  1. use reflection
  2. "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" defines the accepted values and they implement a common interface. It has a Size() which I believe returns the bytes it took.

We can also explore a similar option for metrcis/trace.

@djaglowski
Copy link
Member

djaglowski commented Feb 5, 2024

pdata also has a built in way to determine size. In theory this could be used but we'd need to document clearly what this means because it is often not the same size that the user cares about.

It's previously been discussed whether this is appropriate to enable by default at each component boundary but it was suggested it would add too much overhead. My opinion is that if disabled by default it would be very useful without adding overhead.

@djaglowski
Copy link
Member

This also appears to be related to this discussion.

@jmacd
Copy link
Contributor

jmacd commented Apr 11, 2024

Similar to the issue here: #6638. In https://github.com/open-telemetry/otel-arrow/tree/main/collector/netstats, the OTel-Arrow components implements metrics that could be reused by any gRPC receiver or exporter. I would like to see this standardized and moved into the core.

By the way, open-telemetry/oteps#249 replaced OTEP 238, and I see network-bytes metrics as complimentary to item-outcome metrics discussed in those two drafts.

@VihasMakwana
Copy link
Contributor Author

@jmacd thanks for pointing that out. Indeed we can reuse the ones defined here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collector-telemetry healthchecker and other telemetry collection issues enhancement New feature or request waiting-for-author
Projects
None yet
5 participants