Skip to content

database instrumentation supports semconv 1.30. #367

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
Apr 9, 2025

Conversation

minimAluminiumalism
Copy link
Collaborator

Since currently we still use semconv v1.26.0 which does not include db.collection.name, I defined it as a constant.

NOTICE:
This feature only supports SQL statements that can be parsed by SQL parser packages. If non-standard SQL is used, the span name will fall back to the previous one. For more information, refer here.

Ref: #364

before:
截屏2025-03-22 02 43 34

after:
截屏2025-03-22 02 41 21

@minimAluminiumalism minimAluminiumalism force-pushed the semconv/spanname branch 2 times, most recently from b6c3ac4 to 01df671 Compare March 21, 2025 22:46
@minimAluminiumalism minimAluminiumalism changed the title update span name based on latest semconv update span name based on the latest semconv Mar 22, 2025
@minimAluminiumalism minimAluminiumalism force-pushed the semconv/spanname branch 3 times, most recently from 56f85eb to 5bd8ba5 Compare March 25, 2025 16:37
@minimAluminiumalism
Copy link
Collaborator Author

Update to semconv v1.30.

@CLAassistant
Copy link

CLAassistant commented Mar 27, 2025

CLA assistant check
All committers have signed the CLA.

@minimAluminiumalism minimAluminiumalism force-pushed the semconv/spanname branch 6 times, most recently from b450103 to 999824c Compare March 27, 2025 03:49
@minimAluminiumalism minimAluminiumalism force-pushed the semconv/spanname branch 2 times, most recently from c22f509 to cdb6740 Compare March 31, 2025 17:07
@minimAluminiumalism
Copy link
Collaborator Author

CC @123liuziming

  • Defined a new struct SQLMeta, containing the aforementioned properties.
  • The LRU algo for sql metadata cache has been added.

Seems that the failed TestLatestDepth cases is unrelated to the PR itself.
A newer version of fasthttp is already released, but the cause of the fiberv2 failure needs to be investigated.

@123liuziming
Copy link
Collaborator

CC @123liuziming

  • Defined a new struct SQLMeta, containing the aforementioned properties.
  • The LRU algo for sql metadata cache has been added.

Seems that the failed TestLatestDepth cases is unrelated to the PR itself. A newer version of fasthttp is already released, but the cause of the fiberv2 failure needs to be investigated.

The underlying fiber uses the fasthttp, I will fix that

@minimAluminiumalism minimAluminiumalism force-pushed the semconv/spanname branch 2 times, most recently from 66ad2be to b01387a Compare April 7, 2025 11:33
@minimAluminiumalism minimAluminiumalism changed the title update span name based on the latest semconv database instrumentation supports semconv 1.30. Apr 7, 2025
@minimAluminiumalism
Copy link
Collaborator Author

@123liuziming

  1. Added tests for db collection and db params, related to test/verifier/verifier.go & VerifyDbAttributes().
  2. Extracting SQL params on demand through a new env variable OTEL_INSTRUMENTATION_DB_EXPERIMENTAL_ENABLE.
  3. Change experimentalAttributesEnabler from instrumenter.NewDefaultInstrumentEnabler() to defaultDbExperimentalAttributesEnabler.

@minimAluminiumalism minimAluminiumalism force-pushed the semconv/spanname branch 9 times, most recently from 63bfe74 to 7cb0633 Compare April 8, 2025 03:55
Copy link
Collaborator

@123liuziming 123liuziming left a comment

Choose a reason for hiding this comment

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

LGTM, @NameHaibinZhang feel free to review it

@minimAluminiumalism
Copy link
Collaborator Author

@123liuziming
Could we increase the timeout for running TestPlugins? I've hit the 50-minute limit a few times now.

@123liuziming
Copy link
Collaborator

@123liuziming Could we increase the timeout for running TestPlugins? I've hit the 50-minute limit a few times now.

Yes, I will split all the tests into different pipelines later. For now, just increase the timeout for running TestPlugins

@minimAluminiumalism
Copy link
Collaborator Author

@123liuziming Could we increase the timeout for running TestPlugins? I've hit the 50-minute limit a few times now.

Yes, I will split all the tests into different pipelines later. For now, just increase the timeout for running TestPlugins

OK, I'll also temporarily set the timeout to 90 minutes as part of this PR.

@123liuziming 123liuziming merged commit ef76c15 into alibaba:main Apr 9, 2025
9 checks passed
@minimAluminiumalism minimAluminiumalism deleted the semconv/spanname branch April 9, 2025 02:27
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