phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

PHOENIX-5215 Migrate from HTrace to OpenTelemetry tracing

Open xavifeds8 opened this issue 8 months ago • 4 comments

This PR replaces the deprecated Apache HTrace tracing system with OpenTelemetry, following the same proven pattern that Apache HBase adopted in HBASE-22120. Phoenix now depends only on the OpenTelemetry API at compile time (scope=provided), with the SDK provided at runtime by the OpenTelemetry Java Agent. When no agent is attached, all tracing calls are no-ops with zero overhead.

xavifeds8 avatar Mar 17 '26 09:03 xavifeds8

@stoty , @virajjasani Can you please review on this approach for the migration of htrace into opentelemetry. This is a initial migration PR in the Future PR's i will be working on.

  1. Depreciation TRACE ON, TRACE OFF through SQL Statement.
  2. Adding in more Semantic Attributes in tracing through opentemetry-semconv
  3. Adding in the test cases.
  4. Standarising the span names as per Otel conventions.
  5. Updating the https://phoenix.apache.org/tracing.html website.

setup gist:

Please tell me if the approach seems good to you or you see any issues in the approach. Any suggestions or improvement in the approach are welcome.

xavifeds8 avatar Mar 23 '26 07:03 xavifeds8

Nice work @xavifeds8! The approach seems good. IIUC, this PR only moves from HTrace to OpenTelemetry and in the next set of PRs, you would add more spans?

Could you fix spotless issues and ASF license warnings reported in the latest build?

virajjasani avatar Mar 23 '26 20:03 virajjasani

Nice work @xavifeds8! The approach seems good. IIUC, this PR only moves from HTrace to OpenTelemetry and in the next set of PRs, you would add more spans?

Could you fix spotless issues and ASF license warnings reported in the latest build?

Hey @virajjasani thanks for the reviewing the approach. Currently i have migrated the spans that existed in Htrace. I will be adding some more spans to fill in any gaps following that i will be working on the tasks mentioned above. also i will be fixing the spotless and the license issues now. Can you grant me dev access so that i can assign jira's to myself i would like to work on PHOENIX-5236 as well.

Also, I wanted to ask about how to handle upcoming commits. Should I continue pushing them to the same PR that i have raised? I’m concerned that might make the review process a bit overwhelming. Alternatively, would it be better to create a feature branch and i will raise PRs there? What would you suggest?

xavifeds8 avatar Mar 24 '26 04:03 xavifeds8

Thanks @xavifeds8! I have granted you access to jira, feel free to assign those jiras to youself, and/or create new ones.

For the upcoming commits, new feature branch would be great!

virajjasani avatar Mar 25 '26 03:03 virajjasani