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

Add metricsSourceType tracesSourceType #1376

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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: Propagated "sourcetype" to work for metrics and traces
# One or more tracking issues related to the change
issues: [1376]
# (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 @@ -403,6 +403,9 @@ splunk_hec/platform_metrics:
token: "${SPLUNK_PLATFORM_HEC_TOKEN}"
index: {{ .Values.splunkPlatform.metricsIndex | quote }}
source: {{ .Values.splunkPlatform.source | quote }}
{{- if .Values.splunkPlatform.sourcetype }}
sourcetype: {{ .Values.splunkPlatform.sourcetype | 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
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.

  • Can you create a example in the /examples dir so we can see the for differences this PR would add? I think it would be worth having an example where all telemetry types are enabled for splunkPlatform.*. This will likely make reviews easier as well.
  • You can also even add unit tests under https://github.com/signalfx/splunk-otel-collector-chart/tree/main/test/unittests to help ensure added Helm template logic.

max_idle_conns: {{ .Values.splunkPlatform.maxConnections }}
max_idle_conns_per_host: {{ .Values.splunkPlatform.maxConnections }}
disable_compression: {{ .Values.splunkPlatform.disableCompression }}
Expand Down Expand Up @@ -444,6 +447,9 @@ splunk_hec/platform_traces:
token: "${SPLUNK_PLATFORM_HEC_TOKEN}"
index: {{ .Values.splunkPlatform.tracesIndex | quote }}
source: {{ .Values.splunkPlatform.source | quote }}
{{- if .Values.splunkPlatform.sourcetype }}
sourcetype: {{ .Values.splunkPlatform.sourcetype | quote }}
{{- end }}
max_idle_conns: {{ .Values.splunkPlatform.maxConnections }}
max_idle_conns_per_host: {{ .Values.splunkPlatform.maxConnections }}
disable_compression: {{ .Values.splunkPlatform.disableCompression }}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/splunk-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ splunkPlatform:
# Optional. Default value for `source` field.
source: "kubernetes"
# Optional. Default value for `sourcetype` field. For container logs, it will
# be container name.
# be container name. For metrics and traces it will default to "httpevent".
sourcetype: ""
jvoravong marked this conversation as resolved.
Show resolved Hide resolved
# Maximum HTTP connections to use simultaneously when sending data.
maxConnections: 200
Expand Down
Loading