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

Merge upstream main to prod #4965

Merged
merged 18 commits into from
Nov 14, 2023
Merged

Merge upstream main to prod #4965

merged 18 commits into from
Nov 14, 2023

Conversation

songy23
Copy link
Member

@songy23 songy23 commented Nov 14, 2023

No description provided.

mx-psi and others added 18 commits November 13, 2023 16:27
…odel to string (open-telemetry#29152)

**Description:** 

Add feature gate to change family and CPU model to string, to adapt to
open-telemetry/semantic-conventions/issues/495.

**Link to tracking Issue:** Fixes open-telemetry#29025

**Testing:** Tested with the sample configuration on open-telemetry#26533.
**Description:**
This PR focuses on adding a new feature to the pkg/ottl package—namely,
the `IsBool` converter, along with its prerequisites, `BoolGetter` and
`BoolLikeGetter`. The series of commits implement the core logic, unit
tests, and documentation to ensure that the `IsBool` converter is
seamlessly integrated into the OTTL framework. By using this feature,
users can conveniently determine whether a given value is a boolean or
not.

**Link to tracking Issue:** 
open-telemetry#27897

**Testing:**

- A comprehensive set of unit tests were added to validate the
functionality of the `IsBool` converter. The tests cover native boolean
values, `pcommon.ValueTypeBool` objects, and incorrect types such as
integers and slices.
- Tests for `BoolGetter` and `BoolLikeGetter` were also included to
verify their behavior and error handling mechanisms. Detailed test
implementations can be found in
[pkg/ottl/expression_test.go](https://github.com/Dennis40816/opentelemetry-collector-contrib/blob/0d1c2c0216f5647404573a6cfe66ebc0081a4167/pkg/ottl/expression_test.go#L1452).

**Documentation:**
- Updated README.md in the `pkg/ottl/ottlfuncs` directory to include
detailed descriptions, usage guidelines, and examples for the `IsBool`
converter.
- The README file also reflects the addition of `BoolGetter` and
`BoolLikeGetter` to the list of supported types for single-value
parameters in OTTL functions.
Also updated the references to NewNoopTracerProvider.

Fixes open-telemetry#29158

---------

Signed-off-by: Alex Boten <[email protected]>
…ry#29262)

Bump actions/github-script from 6 to 7
Bump github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata from
0.8.0 to 0.8.1 in /exporter/datadogexporter
Bump github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs from
0.8.0 to 0.8.1 in /exporter/datadogexporter
Bump github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics from
0.8.0 to 0.8.1 in /exporter/datadogexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/exporter/awscloudwatchlogsexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/exporter/awsemfexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/exporter/awsxrayexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/exporter/datadogexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/extension/observer/ecsobserver
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/internal/aws/cwlogs
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/internal/aws/proxy
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/internal/aws/xray
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/internal/metadataproviders
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/processor/resourcedetectionprocessor
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/receiver/awscontainerinsightreceiver
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/receiver/awsecscontainermetricsreceiver
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/receiver/awsxrayreceiver
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.9 in
/internal/aws/awsutil
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.9 in
/internal/aws/k8s
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.9 in
/internal/aws/xray/testdata/sampleapp
Bump github.com/aws/aws-sdk-go-v2 from 1.22.1 to 1.22.2 in
/exporter/awskinesisexporter
Bump github.com/aws/aws-sdk-go-v2 from 1.22.1 to 1.22.2 in
/extension/sigv4authextension
Bump github.com/aws/aws-sdk-go-v2/config from 1.22.2 to 1.24.0 in
/exporter/awskinesisexporter
Bump github.com/aws/aws-sdk-go-v2/config from 1.22.2 to 1.24.0 in
/extension/sigv4authextension
Bump github.com/aws/aws-sdk-go-v2/credentials from 1.15.1 to 1.15.2 in
/exporter/awskinesisexporter
Bump github.com/aws/aws-sdk-go-v2/credentials from 1.15.1 to 1.15.2 in
/extension/sigv4authextension
Bump github.com/aws/aws-sdk-go-v2/service/kinesis from 1.22.0 to 1.22.1
in /exporter/awskinesisexporter
Bump github.com/aws/aws-sdk-go-v2/service/sts from 1.25.0 to 1.25.1 in
/exporter/awskinesisexporter
Bump github.com/aws/aws-sdk-go-v2/service/sts from 1.25.0 to 1.25.1 in
/extension/sigv4authextension
Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.18.0 to 2.18.1 in
/receiver/opencensusreceiver
Bump github.com/jcchavezs/porto from 0.5.1 to 0.6.0 in /internal/tools
Bump github.com/sijms/go-ora/v2 from 2.7.19 to 2.7.20 in
/receiver/sqlqueryreceiver
Bump github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common
from 1.0.786 to 1.0.791 in /exporter/tencentcloudlogserviceexporter
Bump go.mongodb.org/mongo-driver from 1.12.1 to 1.13.0 in
/receiver/mongodbreceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /cmd/configschema
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /cmd/otelcontribcol
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /cmd/oteltestbedcol
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /cmd/telemetrygen/internal/e2etest
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /exporter/coralogixexporter
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /exporter/datadogexporter
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /exporter/datadogexporter/integrationtest
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /exporter/loadbalancingexporter
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /exporter/opencensusexporter
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /exporter/skywalkingexporter
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /extension/jaegerremotesampling
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /processor/k8sattributesprocessor
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /processor/routingprocessor
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /processor/servicegraphprocessor
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /processor/spanmetricsprocessor
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /receiver/jaegerreceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /receiver/jmxreceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /receiver/k8sclusterreceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /receiver/k8sobjectsreceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /receiver/kubeletstatsreceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /receiver/lokireceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /receiver/opencensusreceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /receiver/skywalkingreceiver
Bump
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
from 0.45.0 to 0.46.0 in /testbed
Bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from
0.45.0 to 0.46.0 in /examples/demo/client
Bump golang.org/x/crypto from 0.14.0 to 0.15.0 in
/receiver/podmanreceiver
Bump golang.org/x/net from 0.17.0 to 0.18.0 in
/exporter/azuremonitorexporter
Bump golang.org/x/net from 0.17.0 to 0.18.0 in /internal/aws/awsutil
Bump golang.org/x/net from 0.17.0 to 0.18.0 in /receiver/jaegerreceiver
Bump golang.org/x/oauth2 from 0.13.0 to 0.14.0 in
/exporter/f5cloudexporter
Bump golang.org/x/oauth2 from 0.13.0 to 0.14.0 in
/extension/oauth2clientauthextension
Bump golang.org/x/tools from 0.14.0 to 0.15.0 in /internal/tools

---------

Signed-off-by: Alex Boten <[email protected]>
Co-authored-by: Alex Boten <[email protected]>
**Documentation:** minor for fox the `delete_matching_keys` since they
were referring to the `delete_key` function

Co-authored-by: Tyler Helmuth <[email protected]>
…ry#29268)

Bump actions/github-script from 6 to 7
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/exporter/awscloudwatchlogsexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/exporter/awsemfexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/exporter/awsxrayexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/exporter/datadogexporter
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/extension/observer/ecsobserver
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/internal/aws/cwlogs
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/internal/aws/proxy
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/internal/aws/xray
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/internal/metadataproviders
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/processor/resourcedetectionprocessor
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/receiver/awscontainerinsightreceiver
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/receiver/awsecscontainermetricsreceiver
Bump github.com/aws/aws-sdk-go from 1.47.6 to 1.47.10 in
/receiver/awsxrayreceiver
Bump github.com/aws/aws-sdk-go from 1.47.9 to 1.47.10 in
/internal/aws/awsutil
Bump github.com/aws/aws-sdk-go from 1.47.9 to 1.47.10 in
/internal/aws/k8s
Bump github.com/aws/aws-sdk-go from 1.47.9 to 1.47.10 in
/internal/aws/xray/testdata/sampleapp
Bump github.com/jcchavezs/porto from 0.5.1 to 0.6.0 in /internal/tools
Bump github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common
from 1.0.786 to 1.0.792 in /exporter/tencentcloudlogserviceexporter
…Aliasing (open-telemetry#29113)

This PR fixes an implicit memory aliasing lint issue in
the kubeletstatsreceiver

* fixed code
* removed linting exception

open-telemetry#28584

Co-authored-by: Tyler Helmuth <[email protected]>
…ure Monitor Exporter (open-telemetry#28999)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

This pull request enhances the Azure Monitor Exporter by tagging
telemetry data with the OpenTelemetry Collector's internal SDK version.
This additional metadata will facilitate improved monitoring,
troubleshooting, and analysis of data sourced from different versions of
the collector.

**Changes:**
- Added functionality in `azuremonitorexporter` to append the SDK
version to each telemetry envelope.
- Implemented `getCollectorVersion` to dynamically fetch the current
version of the OpenTelemetry Collector.

**Sample SDK Version String:**
- The SDK version string is formatted as follows:
`otelc-<version>-<os>-<arch>`
- Example: `otelc-v0.88.1-lin-amd64`

**Note:**
- Since this change pertains to internal diagnostic data enrichment and
does not modify any external behavior or configuration interfaces, it
does not necessitate a changelog entry.

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were
added.>
- Adjusted existing unit tests to ensure the SDK version string is
correctly included in the telemetry envelopes.

```json
{
	"ver": 1,
	"name": "Microsoft.ApplicationInsights.RemoteDependency",
	"time": "2023-11-06T15:21:12.9807976-08:00",
	"sampleRate": 100,
	"seq": "",
	"iKey": "Ikey",
	"tags": {
		"ai.cloud.role": "otlp-test",
		"ai.cloud.roleInstance": "2c4a6d1b-f7cb-4579-8d05-65b83b4acf7e",
		*"ai.internal.sdkVersion": "otelc-v0.88.1-lin-amd64",*
		"ai.operation.id": "0e3a010cb64d919aa8f214bf0a166334",
		"ai.operation.parentId": ""
	},
	"data": {
	}
}
```

---------

Co-authored-by: Yang Song <[email protected]>
…ry#26022)

**Description:** The latest release of IBM/sarama includes the
`resolve_canonical_bootstrap_servers_only` setting for
`client.dns.lookup`. In a GSSAPI context, this enables replacing a list
of brokers with a single name that resolves to all of the underlying
IPs. Previously this would fail with a Kerberos error. This PR exposes
the new option in collector config.

**Testing:** Added new cases to check the option is set correctly.

**Documentation:** Added a description of the parameter to the relevant
READMEs.
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
This re-enables the failing tests and updates the expired certificates.

New cert expiration dates:
```
$ openssl x509 -enddate -noout -in testdata/certs/cert.pem 
notAfter=Mar 13 22:55:27 3023 GMT
$ openssl x509 -enddate -noout -in testdata/certs/ca.pem 
notAfter=Mar 13 22:47:43 3023 GMT
```
**Link to tracking Issue:** <Issue number if applicable>
Fixes open-telemetry#29099 

**Testing:** <Describe what testing was performed and which tests were
added.>
Tests are now passing.

**Documentation:** <Describe the documentation added.>
…ass checkapi (open-telemetry#29005)

**Description:**
Remove duplicate function NewFactory and pass checkapi since we should
only keep one NewFactory.

**Link to tracking Issue:**

open-telemetry#26304

**Testing:**
go run cmd/checkapi/main.go .
go test for journaldreceiver

**Documentation:**

Signed-off-by: sakulali <[email protected]>
…ibutes (open-telemetry#26707)

**Description:** <Describe what has changed.>

Two new resource attributes have been added: `server.address` and
`server.port`. This is change aligned with [semantic
conventions](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.25.0/specification/semantic-conventions.md?plain=1#L30)
and allows users identifying a particular redis server.


**Link to tracking Issue:** open-telemetry#22044

**Testing:** <Describe what testing was performed and which tests were
added.>

```
❯ go test -race -timeout 300s -parallel 4 --tags="",integration --count 1 ./...
ok      github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver        6.179s
ok      github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver/internal/metadata      1.464s
```

* Added: new test to check error when the configuration endpoint is
missing or invalid
* Updated: integration test to check new resource attributes

**Documentation:** <Describe the documentation added.>
New attribute documentation was generated using `mdatagen`

---------

Co-authored-by: Antoine Toulme <[email protected]>
…telemetry#29084)

**Description:** Enhances current logs by adding more context to the
warning message and adds a debug log that will help orient users if they
cannot reach that block of code.

**Link to tracking Issue:** Resolves open-telemetry#28851

**Testing:**
```log
2023-11-09T10:11:17.716-0500	warn	[email protected]/logs.go:245	Attempted to retrieve host logs but received 0 logs	{"kind": "receiver", "name": "mongodbatlas", "data_type": "logs", "error": "EOF", "log": "mongos.gz", "hostname": "cluster1-shard-00-00.t5hdg.mongodb.net", "startTime": "2023-11-09T10:06:16.618-0500", "endTime": "2023-11-09T10:11:16.618-0500"}
2023-11-09T10:11:17.946-0500	info	LogsExporter	{"kind": "exporter", "data_type": "logs", "name": "logging", "resource logs": 1, "log records": 28}
2023-11-09T10:11:18.131-0500	warn	[email protected]/logs.go:274	Attempted to retrieve audit logs but received 0 logs	{"kind": "receiver", "name": "mongodbatlas", "data_type": "logs", "error": "EOF", "hostname": "cluster1-shard-00-00.t5hdg.mongodb.net", "log": "mongos-audit-log.gz", "startTime": "2023-11-09T10:06:16.618-0500", "endTime": "2023-11-09T10:11:16.618-0500"}
```


**Documentation:** <Describe the documentation added.>
…r_tags_aggregation (open-telemetry#29089)

**Description:**
Deprecate peer_service_aggregation in favor of peer_tags_aggregation.
Counterpart of DataDog/datadog-agent#20550.
…elemetry#29104)

**Description:** Replacing inaccurate units for the
spark.job.stage.active and spark.job.stage.result metrics for the Apache
Spark receiver.


**Link to tracking Issue:**
[29104](open-telemetry#29104)

**Testing:** N/A

**Documentation:** Documentation for the metadata.yaml file was updated
accordingly.
…n-telemetry#29156)

**Description:**
This PR updates `github.com/DataDog/datadog-agent/pkg/trace` and
`github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes`. This
brings in the following PRs:
DataDog/opentelemetry-mapping-go#193,
DataDog/datadog-agent#20779 which add support
for custom container tags (for traces, metrics and logs) via resource
attributes prefixed by `datadog.container.tag.*`.

This PR also brings a couple other changes for traces which are
reflected in the changelog:
- Stop extracting container tags from span attributes, but only extract
from resource attributes. The semantic conventions we are using to
extract the container tags are meant for resource attributes, so we
should only check resource attributes.
- Stop setting the DD Format container tags as span tags, but only set
these in the dedicated container tag (`_dd.container.tag`). We currently
set the DD mapped container tags both as span tag, and in the dedicated
container tag `_dd.tags.container`. This should only be set in the
dedicated container tag.

The update to opentelemetry-mapping-go also brings in this change:
DataDog/opentelemetry-mapping-go#174, which adds
support for `host.cpu.*` attributes.
@songy23 songy23 merged commit a93303c into prod Nov 14, 2023
84 checks passed
@songy23 songy23 deleted the merge-main-staging branch November 14, 2023 20:13
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.