Skip to content
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

fix(new_relic sink): Put log API attributes in separate structure #21313

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

bruceg
Copy link
Member

@bruceg bruceg commented Sep 18, 2024

The New Relic log API specifies that all attributes other than message and timestamp should go into an attributes field, which may contain any JSON object data except for arrays. This change reworks the logs API model to move all attributes from the log event into this attributes field as well as using structures to encode fields with fixed names instead of using dynamic maps.

The tests have also been updated to compare the overall structure of the output data model so as to ensure that the resulting encoding generated by serde matches what we is specified in the New Relic API documentation.

The New Relic log API specifies that all attributes other than `message` and
`timestamp` should go into an `attributes` field, which may contain any JSON
object data except for arrays. This change reworks the logs API model to move
all attributes from the log event into this attributes field as well as using
structures to encode fields with fixed names instead of using dynamic maps.

The tests have also been updated to compare the overall structure of the output
data model so as to ensure that the resulting encoding generated by `serde`
matches what we is specified in the New Relic API documentation.
@bruceg bruceg added the sink: new_relic Anything `new_relic` sink related label Sep 18, 2024
@bruceg bruceg requested a review from a team as a code owner September 18, 2024 18:35
@github-actions github-actions bot added the domain: sinks Anything related to the Vector's sinks label Sep 18, 2024
@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Sep 18, 2024

Datadog Report

Branch report: bruceg/OPA-2327-fix-log-attributes
Commit report: 43861e2
Test service: vector

✅ 0 Failed, 7 Passed, 0 Skipped, 25.49s Total Time

Copy link
Contributor

@pront pront left a comment

Choose a reason for hiding this comment

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

Looks reasonable 👍

@bruceg bruceg added this pull request to the merge queue Sep 18, 2024
Copy link

Regression Detector Results

Run ID: 100a3610-eb21-453d-a696-733863dbfe97 Metrics dashboard

Baseline: f83b47c
Comparison: 162d9b5

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

Significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

perf experiment goal Δ mean % Δ mean % CI links
syslog_splunk_hec_logs ingress throughput +5.62 [+5.51, +5.72]

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +16.77 [+9.38, +24.15]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +16.77 [+9.38, +24.15]
syslog_splunk_hec_logs ingress throughput +5.62 [+5.51, +5.72]
syslog_log2metric_humio_metrics ingress throughput +3.18 [+3.07, +3.30]
datadog_agent_remap_datadog_logs ingress throughput +1.98 [+1.78, +2.17]
fluent_elasticsearch ingress throughput +1.24 [+0.75, +1.73]
syslog_humio_logs ingress throughput +0.77 [+0.69, +0.85]
syslog_log2metric_splunk_hec_metrics ingress throughput +0.70 [+0.59, +0.82]
datadog_agent_remap_datadog_logs_acks ingress throughput +0.28 [+0.09, +0.47]
http_to_http_noack ingress throughput +0.13 [+0.06, +0.21]
syslog_regex_logs2metric_ddmetrics ingress throughput +0.10 [-0.01, +0.21]
http_to_http_json ingress throughput +0.02 [-0.02, +0.06]
splunk_hec_to_splunk_hec_logs_noack ingress throughput +0.01 [-0.08, +0.10]
splunk_hec_indexer_ack_blackhole ingress throughput +0.01 [-0.07, +0.09]
splunk_hec_to_splunk_hec_logs_acks ingress throughput -0.01 [-0.14, +0.11]
http_text_to_http_json ingress throughput -0.09 [-0.24, +0.05]
http_to_s3 ingress throughput -0.18 [-0.45, +0.09]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput -0.20 [-0.32, -0.09]
otlp_grpc_to_blackhole ingress throughput -0.34 [-0.45, -0.23]
http_to_http_acks ingress throughput -0.55 [-1.77, +0.68]
datadog_agent_remap_blackhole_acks ingress throughput -0.63 [-0.76, -0.51]
http_elasticsearch ingress throughput -1.24 [-1.43, -1.04]
splunk_hec_route_s3 ingress throughput -1.68 [-1.98, -1.38]
datadog_agent_remap_blackhole ingress throughput -2.08 [-2.19, -1.96]
syslog_loki ingress throughput -2.12 [-2.21, -2.03]
socket_to_socket_blackhole ingress throughput -3.63 [-3.70, -3.55]
otlp_http_to_blackhole ingress throughput -3.83 [-3.94, -3.72]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

Merged via the queue into master with commit 162d9b5 Sep 18, 2024
50 checks passed
@bruceg bruceg deleted the bruceg/OPA-2327-fix-log-attributes branch September 18, 2024 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sinks Anything related to the Vector's sinks sink: new_relic Anything `new_relic` sink related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants