Skip to content

Commit

Permalink
Merge branch 'main' into promremotewrite-downscale-histograms-17565
Browse files Browse the repository at this point in the history
  • Loading branch information
Aneurysm9 authored Jul 13, 2023
2 parents 413e3d0 + 343fbff commit 20fbc94
Show file tree
Hide file tree
Showing 54 changed files with 805 additions and 407 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: exporter/datasetexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Remove temporary client side attribute aggregation and corresponding traces.max_wait and traces.aggregate config options which are now redundant."

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [20660]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
This pull request removes the following attributes from the DataSet trace events: services,
span_count, error_count. Those attributes were populated on the client side as part of the client
side aggregation code. This client side aggregation was meant as a temporary solution until a
proper solution is implement on the server side. Being a temporary solution meant it had many
edge cases and would only work under specific and limited circumstances (all spans which belong
to a trace are part of the same batch received by the plugin).
Corresponding config options (traces.aggregate and traces.max_wait) which are not redundant and
unused have also been removed.
20 changes: 20 additions & 0 deletions .chloggen/ecsobserver-nil-container-arn-fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: ecsobserver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Don't fail with error when finding a task of EC2 launch type and missing container instance, just ignore them. This fixes behavior when task is provisioning and its containers are not assigned to instances yet.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [23279]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
22 changes: 22 additions & 0 deletions .chloggen/k8sattr_timestampformat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: k8sattrprocessor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add k8sattr.rfc3339 feature gate to allow RFC3339 format for k8s.pod.start_time timestamp value.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [24016]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
Timestamp value before and after.
`2023-07-10 12:34:39.740638 -0700 PDT m=+0.020184946`, `2023-07-10T12:39:53.112485-07:00`
21 changes: 21 additions & 0 deletions .chloggen/mx-psi_parallel-source-resolution.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: datadogexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Source resolution logic now runs all source providers in parallel to improve start times."

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [24234]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
All source providers now run in all environments so you may see more spurious logs from downstream dependencies when using the Datadog exporter. These logs should be safe to ignore.
20 changes: 20 additions & 0 deletions .chloggen/pkg-stanza-input-syslog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: pkg/stanza

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix issue where syslog input ignored enable_octet_counting setting

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [24073]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
20 changes: 20 additions & 0 deletions .chloggen/servicegraphprocessor-deprecated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'deprecation'

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: servicegraphprocessor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Service Graph Processor is deprecated in favor of the Service Graph Connector

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [19737]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
22 changes: 22 additions & 0 deletions .chloggen/spanmetricsconnector-disabled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
# If your change doesn't affect end users, such as a test fix or a tooling change,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: spanmetricsconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Histograms will not have exemplars by default"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [23872]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
Previously spanmetricsconnector would attach every single span as an exemplar to the histogram.
Exemplars are now disabled by default. To enable them set `exemplars::enabled=true`
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new_component.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: New component proposal
description: Suggest a new component for the project
title: "New component: "
labels: ["new component", "needs triage"]
labels: ["Sponsor Needed", "needs triage"]
body:
- type: textarea
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
cache: false
- name: Cache Go
id: go-mod-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down Expand Up @@ -82,6 +83,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down Expand Up @@ -142,6 +144,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand All @@ -164,6 +167,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down Expand Up @@ -236,6 +240,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down Expand Up @@ -312,6 +317,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand All @@ -332,6 +338,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand All @@ -357,6 +364,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down Expand Up @@ -420,6 +428,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down Expand Up @@ -554,6 +563,7 @@ jobs:
mkdir bin/ dist/
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down Expand Up @@ -56,6 +57,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down Expand Up @@ -68,6 +69,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prometheus-compliance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tidy-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
cache: false
- name: Cache Go
id: go-cache
timeout-minutes: 5
uses: actions/cache@v3
with:
path: |
Expand Down
6 changes: 5 additions & 1 deletion connector/spanmetricsconnector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ The following settings can be optionally configured:
One of either `AGGREGATION_TEMPORALITY_CUMULATIVE` or `AGGREGATION_TEMPORALITY_DELTA`.
- `namespace`: Defines the namespace of the generated metrics. If `namespace` provided, generated metric name will be added `namespace.` prefix.
- `metrics_flush_interval` (default: `15s`): Defines the flush interval of the generated metrics.

- `exemplars`: Use to configure how to attach exemplars to histograms
- `enabled` (default: `false`): enabling will add spans as Exemplars.

## Examples

The following is a simple example usage of the `spanmetrics` connector.
Expand All @@ -123,6 +125,8 @@ connectors:
- name: http.method
default: GET
- name: http.status_code
exemplars:
enabled: true
exclude_dimensions: ['status.code']
dimensions_cache_size: 1000
aggregation_temporality: "AGGREGATION_TEMPORALITY_CUMULATIVE"
Expand Down
7 changes: 7 additions & 0 deletions connector/spanmetricsconnector/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ type Config struct {

// Namespace is the namespace of the metrics emitted by the connector.
Namespace string `mapstructure:"namespace"`

// Exemplars defines the configuration for exemplars.
Exemplars ExemplarsConfig `mapstructure:"exemplars"`
}

type HistogramConfig struct {
Expand All @@ -64,6 +67,10 @@ type HistogramConfig struct {
Explicit *ExplicitHistogramConfig `mapstructure:"explicit"`
}

type ExemplarsConfig struct {
Enabled bool `mapstructure:"enabled"`
}

type ExponentialHistogramConfig struct {
MaxSize int32 `mapstructure:"max_size"`
}
Expand Down
16 changes: 14 additions & 2 deletions connector/spanmetricsconnector/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ func TestLoadConfig(t *testing.T) {
},
DimensionsCacheSize: 1500,
MetricsFlushInterval: 30 * time.Second,
Exemplars: ExemplarsConfig{
Enabled: true,
},
Histogram: HistogramConfig{
Unit: metrics.Seconds,
Explicit: &ExplicitHistogramConfig{
Expand All @@ -59,8 +62,7 @@ func TestLoadConfig(t *testing.T) {
},
},
},
},
},
}},
{
id: component.NewIDWithName(metadata.Type, "exponential_histogram"),
expected: &Config{
Expand All @@ -83,6 +85,16 @@ func TestLoadConfig(t *testing.T) {
id: component.NewIDWithName(metadata.Type, "invalid_histogram_unit"),
errorMessage: "unknown Unit \"h\"",
},
{
id: component.NewIDWithName(metadata.Type, "exemplars_enabled"),
expected: &Config{
AggregationTemporality: "AGGREGATION_TEMPORALITY_CUMULATIVE",
DimensionsCacheSize: defaultDimensionsCacheSize,
MetricsFlushInterval: 15 * time.Second,
Histogram: HistogramConfig{Disable: false, Unit: defaultUnit},
Exemplars: ExemplarsConfig{Enabled: true},
},
},
}

for _, tt := range tests {
Expand Down
Loading

0 comments on commit 20fbc94

Please sign in to comment.