Skip to content

Add initial OTEL instrumentation logic in imagecustomizer #241

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

aditjha-msft
Copy link
Contributor

@aditjha-msft aditjha-msft commented May 21, 2025

This PR introduces support for using the OTEL Go sdk to instrument the tool using OTEL standards and practices. It provides initialization logic needed for a global tracer to be used across the tool's execution. For starters, the PR adds a customization time span, with more telemetry to be added in follow up PRs that help with data collection tied to the tool's KPIs.

The PR also adds logic to disable telemetry, and uses a no-op tracer when --disable-telemetry is passed in. This follows OTEL standardized method of disabling telemetry collection in a clean manner.

As part of telemetry initialization, the telemetry.go file has been added to set up the OTEL tracer and the OTLP grpc exporter. The exporter will send data to a Python service listening at the local port, which will then forward the data to Azure Monitor.

In the effort of splitting up PRs in chunks, the PR for the complement Python telemetry service is here: #249.


Checklist

  • Tests added/updated
  • Documentation updated (if needed)
  • Code conforms to style guidelines

@aditjha-msft aditjha-msft marked this pull request as ready for review May 29, 2025 17:47
@aditjha-msft aditjha-msft requested a review from a team as a code owner May 29, 2025 17:47
@aditjha-msft aditjha-msft marked this pull request as draft May 29, 2025 17:50
@aditjha-msft aditjha-msft marked this pull request as ready for review May 29, 2025 17:52
@aditjha-msft aditjha-msft marked this pull request as draft May 29, 2025 17:52
@aditjha-msft aditjha-msft marked this pull request as ready for review May 29, 2025 17:56
@aditjha-msft aditjha-msft requested a review from cwize1 May 30, 2025 00:45
@aditjha-msft aditjha-msft requested a review from cwize1 May 30, 2025 21:57
cwize1
cwize1 previously approved these changes May 30, 2025
@aditjha-msft aditjha-msft force-pushed the user/aditjha/instrumentWithOTEL branch from 452dd69 to f103a0a Compare May 30, 2025 22:48
@aditjha-msft aditjha-msft merged commit e1f69b9 into main May 30, 2025
8 checks passed
@aditjha-msft aditjha-msft deleted the user/aditjha/instrumentWithOTEL branch May 30, 2025 23:12
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.

3 participants