Skip to content

Commit

Permalink
Merge branch 'main' into renovate/opentelemetry-go-monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
codeboten authored Apr 15, 2024
2 parents ee48ebf + d936776 commit 06e8e35
Show file tree
Hide file tree
Showing 30 changed files with 1,563 additions and 29 deletions.
27 changes: 27 additions & 0 deletions .chloggen/goleak_fluentforwardrec.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: fluentforwardreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix memory leak

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

# (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/goleak_mongodbatlas.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: mongodbatlasreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix memory leak by closing idle connections on shutdown

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

# (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]
20 changes: 20 additions & 0 deletions .chloggen/servicegraphconnector-virtualnodes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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: connector/servicegraphconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change `connector.servicegraph.virtualNode` feature gate from Alpha to Beta (now enabled by default) and change `virtual_node_peer_attributes` default values.

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

# 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]
1 change: 1 addition & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
env:
TEST_RESULTS: testbed/tests/results/junit/results.xml
GOPROXY: https://goproxy.cncf.actuated.dev,direct
# Make sure to exit early if cache segment download times out after 2 minutes.
# We limit cache download as a whole to 5 minutes.
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
Expand Down
6 changes: 3 additions & 3 deletions connector/servicegraphconnector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ datasources:
The following settings are required:
- `metrics_exporter`: the name of the exporter that this processor will write metrics to. This exporter **must** be present in a pipeline.
- `metrics_exporter`: the name of the exporter that this connector will write metrics to. This exporter **must** be present in a pipeline.
- `latency_histogram_buckets`: the list of durations defining the latency histogram buckets.
- Default: `[2ms, 4ms, 6ms, 8ms, 10ms, 50ms, 100ms, 200ms, 400ms, 800ms, 1s, 1400ms, 2s, 5s, 10s, 15s]`
- `dimensions`: the list of dimensions to add together with the default dimensions defined above.
Expand All @@ -134,8 +134,8 @@ The following settings can be optionally configured:
- Default: `1m`
- `store_expiration_loop`: the time to expire old entries from the store periodically.
- Default: `2s`
- `virtual_node_peer_attributes`: the list of attributes need to match for building virtual server node, the higher the front, the higher the priority.
- Default: `[db.name, net.sock.peer.addr, net.peer.name, rpc.service, net.sock.peer.name, net.peer.name, http.url, http.target]`
- `virtual_node_peer_attributes`: the list of attributes, ordered by priority, whose presence in a client span will result in the creation of a virtual server node. An empty list disables virtual node creation.
- Default: `[peer.service, db.name, db.system]`
- `metrics_flush_interval`: the interval at which metrics are flushed to the exporter.
- Default: Metrics are flushed on every received batch of traces.
- `database_name_attribute`: the attribute name used to identify the database name from span attributes.
Expand Down
4 changes: 2 additions & 2 deletions connector/servicegraphconnector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var (
}

defaultPeerAttributes = []string{
semconv.AttributeDBName, semconv.AttributeNetSockPeerAddr, semconv.AttributeNetPeerName, semconv.AttributeRPCService, semconv.AttributeNetSockPeerName, semconv.AttributeNetPeerName, semconv.AttributeHTTPURL, semconv.AttributeHTTPTarget,
semconv.AttributePeerService, semconv.AttributeDBName, semconv.AttributeDBSystem,
}

defaultDatabaseNameAttribute = semconv.AttributeDBName
Expand Down Expand Up @@ -380,7 +380,7 @@ func (p *serviceGraphConnector) onExpire(e *store.Edge) {

p.statExpiredEdges.Add(context.Background(), 1)

if virtualNodeFeatureGate.IsEnabled() {
if virtualNodeFeatureGate.IsEnabled() && len(p.config.VirtualNodePeerAttributes) > 0 {
e.ConnectionType = store.VirtualNode
if len(e.ClientService) == 0 && e.Key.SpanIDIsEmpty() {
e.ClientService = "user"
Expand Down
8 changes: 4 additions & 4 deletions connector/servicegraphconnector/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ var virtualNodeFeatureGate, legacyMetricNamesFeatureGate, legacyLatencyUnitMsFea
func init() {
virtualNodeFeatureGate = featuregate.GlobalRegistry().MustRegister(
virtualNodeFeatureGateID,
featuregate.StageAlpha,
featuregate.WithRegisterDescription("When enabled, when the edge expires, processor checks if it has peer attributes(`db.name, net.sock.peer.addr, net.peer.name, rpc.service, http.url, http.target`), and then aggregate the metrics with virtual node."),
featuregate.StageBeta,
featuregate.WithRegisterDescription("When enabled and setting `virtual_node_peer_attributes` is not empty, the connector looks for the presence of these attributes in span to create virtual server nodes."),
featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/17196"),
)
// TODO: Remove this feature gate when the legacy metric names are removed.
legacyMetricNamesFeatureGate = featuregate.GlobalRegistry().MustRegister(
legacyLatencyMetricNamesFeatureGateID,
featuregate.StageAlpha, // Alpha because we want it disabled by default.
featuregate.WithRegisterDescription("When enabled, processor uses legacy latency metric names."),
featuregate.WithRegisterDescription("When enabled, connector uses legacy latency metric names."),
featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/18743,https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16578"),
)
legacyLatencyUnitMsFeatureGate = featuregate.GlobalRegistry().MustRegister(
legacyLatencyUnitMs,
featuregate.StageAlpha, // Alpha because we want it disabled by default.
featuregate.WithRegisterDescription("When enabled, processor reports latency in milliseconds, instead of seconds."),
featuregate.WithRegisterDescription("When enabled, connector reports latency in milliseconds, instead of seconds."),
featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27488"),
)
}
Expand Down
1 change: 1 addition & 0 deletions exporter/elasticsearchexporter/integrationtest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
results/*
1 change: 1 addition & 0 deletions exporter/elasticsearchexporter/integrationtest/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../../Makefile.Common
Loading

0 comments on commit 06e8e35

Please sign in to comment.