Skip to content

Conversation

@weixiang1862
Copy link
Member

Fix meaningless service mesh metrics in none mesh environment

  • Add a unit test to verify that the fix works.
  • Explain briefly why the bug exists and how to fix it.
  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

In no sidecar environment, service mesh metrics should not be generated.

Comment on lines +19 to +20
service_sidecar_internal_req_latency_nanos = from(Service.sideCar.internalRequestLatencyNanos).filter(sideCar != null).longAvg();
service_sidecar_internal_resp_latency_nanos = from(Service.sideCar.internalResponseLatencyNanos).filter(sideCar != null).longAvg();
Copy link
Member

Choose a reason for hiding this comment

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

There are mesh OAL only, why do we filter this?

Copy link
Member

Choose a reason for hiding this comment

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

If you don't need mesh, you don't have to activate these OALs.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the out-of-the-box state is better: if users don't use mesh, mesh metrics are not generated; if users use mesh, mesh metrics are generated. Changing configuration files may introduce more works for user.

Copy link
Member

@wu-sheng wu-sheng Dec 15, 2025

Choose a reason for hiding this comment

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

Generally, users are not encouraged to activate all analyses, as, it actually has a price(extra and unnecessary resources) to pay.
Please follow this best practice. The extra resource costs(CPU, memory) are much more expensive in the product env, compared with a config to be set.

Copy link
Member Author

Choose a reason for hiding this comment

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

I closed it.

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.

2 participants