Skip to content

Conversation

@aaron-steinfeld
Copy link
Contributor

Description

This allows fallback support, where we can propose alternative definitions of an attribute that will be tried in order. For example, if we wanted to get the version of the tracer we could define an attribute with a definition like below, first trying the hypertrace version attribute, and if missing using the otel spec defined one. Changes to support evaluating this will be added to the attribute reader.

definition: {
  first_value_present: {
    definitions: [
      {
        source_path: hypertrace.module.version
      },
      {
        source_path: telemetry.sdk.version
      }
    ]
  }
}

Testing

API addition only, but verified it functionally in an e2e setup.

@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #84 (f0a64a9) into main (c89a6b2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main      #84   +/-   ##
=========================================
  Coverage     80.71%   80.71%           
  Complexity      222      222           
=========================================
  Files            27       27           
  Lines           752      752           
  Branches         56       56           
=========================================
  Hits            607      607           
  Misses           98       98           
  Partials         47       47           
Flag Coverage Δ Complexity Δ
integration 80.71% <ø> (ø) 0.00 <ø> (ø)
unit 67.77% <ø> (ø) 0.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c89a6b2...f0a64a9. Read the comment docs.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@aaron-steinfeld aaron-steinfeld requested a review from a team April 7, 2021 13:15
@github-actions

This comment has been minimized.

@aaron-steinfeld aaron-steinfeld merged commit 45b88ce into main Apr 7, 2021
@aaron-steinfeld aaron-steinfeld deleted the first-definition-present branch April 7, 2021 13:29
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2021

Unit Test Results

20 files  ±0  20 suites  ±0   11s ⏱️ -1s
75 tests ±0  75 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 45b88ce. ± Comparison against base commit c89a6b2.

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