Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daidokoro authored Sep 17, 2023
2 parents 36cd544 + cd25ada commit ea13748
Show file tree
Hide file tree
Showing 74 changed files with 2,560 additions and 506 deletions.
22 changes: 22 additions & 0 deletions .chloggen/26354-allow-subsecond-decisionwait.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.

# 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: processor/tailsampling

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Allow sub-second decision wait time

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

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
20 changes: 20 additions & 0 deletions .chloggen/feat_contexts-take-time.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: 'enhancement'

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Update contexts to set and get time.Time"

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

# (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:
27 changes: 27 additions & 0 deletions .chloggen/mysqlreceicer-checkapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# 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: mysqlreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Do not export the function `Query`

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

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [api]
27 changes: 27 additions & 0 deletions .chloggen/pkg-stanza-fileconsumer-default-flush.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# 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 bug where force_flush_period not applied

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

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
27 changes: 27 additions & 0 deletions .chloggen/routing_connector_alpha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# 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: routingconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change routingconnector stability to alpha

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

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
27 changes: 27 additions & 0 deletions .chloggen/tls-optional-cloudflare-receiver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# 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: cloudflarereceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Make TLS config optional for cloudflarereceiver

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

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
27 changes: 27 additions & 0 deletions .chloggen/xray-exporter-w3c-id-beta-feature-gate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# 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: awsxrayexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Change `exporter.awsxray.skiptimestampvalidation` feature gate from Alpha to Beta"

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

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
6 changes: 6 additions & 0 deletions .github/workflows/configs/e2e-kind-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
kubeadmConfigPatches:
- |
kind: KubeletConfiguration
serverTLSBootstrap: true
9 changes: 8 additions & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ jobs:
node_image: kindest/node:${{ matrix.k8s-version }}
kubectl_version: ${{ matrix.k8s-version }}
cluster_name: kind
config: ./.github/workflows/configs/e2e-kind-config.yaml
- name: Fix kubelet TLS server certificates
run: |
kubectl get csr -o=jsonpath='{range.items[?(@.spec.signerName=="kubernetes.io/kubelet-serving")]}{.metadata.name}{" "}{end}' | xargs kubectl certificate approve
- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand All @@ -95,4 +99,7 @@ jobs:
run: |
cd processor/k8sattributesprocessor
go test -v --tags=e2e
- name: run receiver/kubeletstatsreceiver e2e tests
run: |
cd receiver/kubeletstatsreceiver
go test -v --tags=e2e
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ linters-settings:
explicit-exhaustive-switch: true
ignore-enum-members: "pmetric.MetricTypeEmpty"

predeclared:
ignore: copy

linters:
enable:
- decorder
Expand All @@ -142,6 +145,7 @@ linters:
- gosec
- govet
- misspell
- predeclared
- reassign
- revive
- staticcheck
Expand Down
2 changes: 0 additions & 2 deletions cmd/checkapi/allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ exporter/sentryexporter
exporter/sumologicexporter
extension/observer/ecsobserver
extension/observer
extension/observer/k8sobserver
processor/groupbyattrsprocessor
processor/groupbytraceprocessor
processor/probabilisticsamplerprocessor
Expand All @@ -28,7 +27,6 @@ receiver/journaldreceiver
receiver/kafkareceiver
receiver/mongodbatlasreceiver
receiver/mongodbreceiver
receiver/mysqlreceiver
receiver/podmanreceiver
receiver/pulsarreceiver
receiver/windowseventlogreceiver
4 changes: 3 additions & 1 deletion cmd/telemetrygen/internal/common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ func (c *Config) CommonFlags(fs *pflag.FlagSet) {

// custom headers
c.Headers = make(map[string]string)
fs.Var(&c.Headers, "otlp-header", "Custom header to be passed along with each OTLP request. The value is expected in the format key=value."+
fs.Var(&c.Headers, "otlp-header", "Custom header to be passed along with each OTLP request. The value is expected in the format key=\"value\"."+
"Note you may need to escape the quotes when using the tool from a cli."+
"Flag may be repeated to set multiple headers (e.g -otlp-header key1=value1 -otlp-header key2=value2)")

// custom resource attributes
c.ResourceAttributes = make(map[string]string)
fs.Var(&c.ResourceAttributes, "otlp-attributes", "Custom resource attributes to use. The value is expected in the format key=\"value\"."+
"Note you may need to escape the quotes when using the tool from a cli."+
"Flag may be repeated to set multiple attributes (e.g -otlp-attributes key1=\"value1\" -otlp-attributes key2=\"value2\")")
}
8 changes: 4 additions & 4 deletions connector/routingconnector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Frouting%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Frouting) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Frouting%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Frouting) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@mwear](https://www.github.com/mwear) |

[development]: https://github.com/open-telemetry/opentelemetry-collector#development
[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib

## Supported Pipeline Types

| [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] |
| ------------------------ | ------------------------ | ----------------- |
| traces | traces | [development] |
| metrics | metrics | [development] |
| logs | logs | [development] |
| traces | traces | [alpha] |
| metrics | metrics | [alpha] |
| logs | logs | [alpha] |

[Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type
[Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion connector/routingconnector/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: routing
status:
class: connector
stability:
development: [traces_to_traces, metrics_to_metrics, logs_to_logs]
alpha: [traces_to_traces, metrics_to_metrics, logs_to_logs]
distributions: [contrib]
codeowners:
active: [jpkrohling, mwear]
6 changes: 3 additions & 3 deletions exporter/awsxrayexporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ propagated by them using the `X-Amzn-Trace-Id` HTTP header. However, other gener
supported by replacing fully-random Trace IDs with X-Ray formatted Trace IDs where necessary:

> AWS X-Ray IDs are the same size as W3C Trace Context IDs but differ in that the first 32 bits of a Trace ID
> is the Unix epoch time when the trace was started. Since X-Ray only allows submission of Trace IDs from the
> past 30 days, received Trace IDs are checked and spans without a valid timestamp are dropped.
> is the Unix epoch time when the trace was started. Note that X-Ray only allows submission of Trace IDs from
> the past 30 days, otherwise the trace is dropped by X-Ray. The Exporter will not validate this timestamp.
This means in order for spans to appear in X-Ray, the client SDK MUST use an X-Ray ID generator. For more
This means that until X-Ray supports Trace Ids consisting of fully random bits, in order for spans to appear in X-Ray, the client SDK MUST use an X-Ray ID generator. For more
information, see
[configuring the X-Ray exporter](https://aws-otel.github.io/docs/getting-started/x-ray#configuring-the-aws-x-ray-exporter).

Expand Down
6 changes: 2 additions & 4 deletions exporter/awsxrayexporter/awsxray_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,13 @@ func TestXrayAndW3CSpanTraceExport(t *testing.T) {
func TestXrayAndW3CSpanTraceResourceExtraction(t *testing.T) {
td := constructXrayAndW3CSpanData()
logger, _ := zap.NewProduction()
assert.Len(t, extractResourceSpans(generateConfig(t), logger, td), 2, "2 spans have xay trace id")
assert.Len(t, extractResourceSpans(generateConfig(t), logger, td), 4, "4 spans have xray/w3c trace id")
}

func TestW3CSpanTraceResourceExtraction(t *testing.T) {
t.Skip("Flaky test, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/9255")
td := constructW3CSpanData()
logger, _ := zap.NewProduction()
assert.Len(t, extractResourceSpans(generateConfig(t), logger, td), 0, "0 spans have xray trace id")
assert.Len(t, extractResourceSpans(generateConfig(t), logger, td), 2, "2 spans have w3c trace id")
}

func TestTelemetryEnabled(t *testing.T) {
Expand Down Expand Up @@ -137,7 +136,6 @@ func constructSpanData() ptrace.Traces {
return traces
}

// nolint:unused
func constructW3CSpanData() ptrace.Traces {
resource := constructResource()
traces := ptrace.NewTraces()
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsxrayexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

var skipTimestampValidationFeatureGate = featuregate.GlobalRegistry().MustRegister(
"exporter.awsxray.skiptimestampvalidation",
featuregate.StageAlpha,
featuregate.StageBeta,
featuregate.WithRegisterDescription("Remove XRay's timestamp validation on first 32 bits of trace ID"),
featuregate.WithRegisterFromVersion("v0.84.0"))

Expand Down
2 changes: 1 addition & 1 deletion exporter/awsxrayexporter/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestCreateDefaultConfig(t *testing.T) {
ResourceARN: "",
RoleARN: "",
},
skipTimestampValidation: false,
skipTimestampValidation: true,
}, "failed to create default config")
assert.NoError(t, componenttest.CheckConfigStruct(cfg))
}
Expand Down
Loading

0 comments on commit ea13748

Please sign in to comment.