Skip to content

Conversation

EdwardJXLi
Copy link
Contributor

@EdwardJXLi EdwardJXLi commented Jun 4, 2025

Description

Deprecate the existing modifyscope processor within ops-agent and migrate to utilizing the transform processor OTTL for achieving the same functionality.

Related issue

N/A

How has this been tested?

Unit Tests & Integration Tests

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@ridwanmsharif
Copy link
Contributor

failures seem like flakes. Retrying now

@ridwanmsharif ridwanmsharif added the kokoro:force-run Forces kokoro to run integration tests on a CL label Jun 4, 2025
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Jun 4, 2025
otel.AddPrefix("workload.googleapis.com"),
),
otel.ModifyInstrumentationScope(r.Type(), "1.0"),
otel.Transform(
Copy link
Contributor

@franciscovalentecastro franciscovalentecastro Jun 4, 2025

Choose a reason for hiding this comment

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

Why not just update the implementation of ModifyInstrumentationScope with the new use of the otel.Transform processor ?

IMO this would be helpful in the long run to reduce code duplication, reduce tech debt and the overall maintenance of 3P app receiver implementations. Also, it will identify this processor instance for future readers with purpose of "changing the instrumentation scope".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc @ridwanmsharif @avilevy18, I think we discussed this and the idea was deprecating ModifyInstrumentationScope entirely would decrease the surface area of otel.processors, since ModifyInstrumentationScope and Transform are almost identical anyways

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Heads up, ended up changing the strategy to use the existing otel.TransformationMetrics processor instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good! The new use of the existing otel.TransformationMetrics to set Scope looks good to me.

@EdwardJXLi EdwardJXLi changed the title Deprecate instrumentation scope processor [DRAFT] Deprecate instrumentation scope processor Jun 4, 2025
@EdwardJXLi EdwardJXLi force-pushed the edwardjxli-deprecate-instrumentation-scope-processor branch from 68af670 to a5e2d6c Compare June 9, 2025 17:11
@EdwardJXLi EdwardJXLi requested a review from ridwanmsharif June 9, 2025 17:44
@EdwardJXLi EdwardJXLi changed the title [DRAFT] Deprecate instrumentation scope processor Deprecate instrumentation scope processor Jun 9, 2025
@EdwardJXLi EdwardJXLi marked this pull request as ready for review June 9, 2025 17:54
@avilevy18 avilevy18 self-requested a review June 9, 2025 18:06
@EdwardJXLi EdwardJXLi added the kokoro:force-run Forces kokoro to run integration tests on a CL label Jun 9, 2025
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Jun 9, 2025
@EdwardJXLi EdwardJXLi added the kokoro:force-run Forces kokoro to run integration tests on a CL label Jun 10, 2025
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Jun 10, 2025
Copy link
Contributor

@ridwanmsharif ridwanmsharif left a comment

Choose a reason for hiding this comment

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

This is a great reduction of tech debt. Thanks for this!

@EdwardJXLi EdwardJXLi merged commit 0b7181d into master Jun 10, 2025
71 of 75 checks passed
@EdwardJXLi EdwardJXLi deleted the edwardjxli-deprecate-instrumentation-scope-processor branch June 10, 2025 16:57
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.

5 participants