Skip to content

influx2otel: Remove runtime dependency on pdatautil - #353

Open
HNO3Miracle wants to merge 1 commit into
influxdata:mainfrom
HNO3Miracle:upstream/drop-pdatautil
Open

influx2otel: Remove runtime dependency on pdatautil#353
HNO3Miracle wants to merge 1 commit into
influxdata:mainfrom
HNO3Miracle:upstream/drop-pdatautil

Conversation

@HNO3Miracle

Copy link
Copy Markdown

Summary

  • replace the two pdatautil.MapHash calls with a deterministic, length-delimited attribute key
  • keep pdatautil only as an indirect test dependency through pdatatest

Motivation

Collector contrib imports influx2otel from its InfluxDB receiver, while influx2otel imports pdatautil from Collector contrib. This creates a runtime dependency cycle between the two repositories. The key is used only for internal resource and data-point lookup, so using a deterministic string key removes the cycle without changing the public API.

Testing

cd influx2otel
go test ./...

Collector contrib imports influx2otel from its InfluxDB receiver, while influx2otel imports pdatautil from Collector contrib. This forms a package-level dependency cycle when the repositories are packaged as complete source trees.

Use a deterministic, length-delimited attribute key for the two internal lookup maps instead. Keep pdatautil as an indirect test dependency through pdatatest.

Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
@HNO3Miracle
HNO3Miracle requested review from a team as code owners August 18, 2026 21:58
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.

1 participant