Skip to content

Add metricsSourceType tracesSourceType #1376

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

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .chloggen/addmetricsSourceTypetracesSourceType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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. agent, clusterReceiver, gateway, operator, chart, other)
component: chart
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Added `metricsSourceType` and `tracesSourceType` to the chart
# One or more tracking issues related to the change
issues: []
# (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:
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ splunk_hec/platform_metrics:
token: "${SPLUNK_PLATFORM_HEC_TOKEN}"
index: {{ .Values.splunkPlatform.metricsIndex | quote }}
source: {{ .Values.splunkPlatform.source | quote }}
{{- if .Values.splunkPlatform.metricsSourceType }}
sourcetype: {{ .Values.splunkPlatform.metricsSourceType | quote }}
{{- end }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like it may get confusing since we are adding a sourcetype to logs with "resource/logs" processor. Maybe we could create something similar for metrics/traces?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbylica-splunk I can work on that.
On the other hand we set all other Splunk metadata for logs/metrics/traces in the hec exporters, so it's also quite an intuitive place for setting the sourcetype as well.
What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, that makes more sense in my opinion. Do mind though that this would add a sourcetype everywhere - to the gateway and receiver too. If that's okay then I think we can move it to hec_exporters

Copy link
Contributor

@jvoravong jvoravong Sep 20, 2024

Choose a reason for hiding this comment

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

I think there are still some gaps here for telemetry data support for a splunk-platform-enable-all-telemetry values configuration.

max_idle_conns: {{ .Values.splunkPlatform.maxConnections }}
max_idle_conns_per_host: {{ .Values.splunkPlatform.maxConnections }}
disable_compression: {{ .Values.splunkPlatform.disableCompression }}
Expand Down Expand Up @@ -432,6 +435,9 @@ splunk_hec/platform_traces:
token: "${SPLUNK_PLATFORM_HEC_TOKEN}"
index: {{ .Values.splunkPlatform.tracesIndex | quote }}
source: {{ .Values.splunkPlatform.source | quote }}
{{- if .Values.splunkPlatform.tracesSourceType }}
sourcetype: {{ .Values.splunkPlatform.tracesSourceType | quote }}
{{- end }}
max_idle_conns: {{ .Values.splunkPlatform.maxConnections }}
max_idle_conns_per_host: {{ .Values.splunkPlatform.maxConnections }}
disable_compression: {{ .Values.splunkPlatform.disableCompression }}
Expand Down
13 changes: 13 additions & 0 deletions helm-charts/splunk-otel-collector/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@
"sourcetype": {
"type": "string"
},
"metricsSourceType": {
"type": "string"
},
"tracesSourceType": {
"type": "string"
},
"maxConnections": {
"type": "integer"
},
Expand Down Expand Up @@ -170,6 +176,13 @@
"const": true
}
}
},
{
"properties": {
"tracesEnabled": {
"const": true
}
}
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions helm-charts/splunk-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ splunkPlatform:
# Optional. Default value for `sourcetype` field. For container logs, it will
# be container name.
sourcetype: ""
# Optional. Default value for the metrics' sourcetype field. If not set, it will default to "httpevent".
metricsSourceType: ""
# Optional. Default value for the traces' sourcetype field. If not set, it will default to "httpevent".
tracesSourceType: ""
# Maximum HTTP connections to use simultaneously when sending data.
maxConnections: 200
# Whether to disable gzip compression over HTTP. Defaults to true.
Expand Down
Loading