Skip to content

Commit

Permalink
Merge pull request #1569 from splunk/repo-sync
Browse files Browse the repository at this point in the history
Pulling refs/heads/main into main
  • Loading branch information
aurbiztondo-splunk authored Oct 14, 2024
2 parents f60ab6f + 03b229f commit bf9b317
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 92 deletions.
4 changes: 2 additions & 2 deletions gdi/monitors-gitlab/gitlab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ The following Prometheus endpoint targets are available:
Important notes
~~~~~~~~~~~~~~~~~~~~~~

* If you configue GitLab by editing ``/etc/gitlab/gitlab.rb``, run the command ``gitlab-ctl reconfigure`` for the changes to take effect.
* If you configure GitLab by editing ``/etc/gitlab/gitlab.rb``, run the command ``gitlab-ctl reconfigure`` for the changes to take effect.

* If you configue nginx by editing the file ``/var/opt/gitlab/nginx/conf/nginx-status.conf``, run the command ``gitlab-ctl restart``.
* If you configure nginx by editing the file ``/var/opt/gitlab/nginx/conf/nginx-status.conf``, run the command ``gitlab-ctl restart``.

* Note that changes to the configuration file ``/var/opt/gitlab/nginx/conf/nginx-status.conf`` in particular are erased by subsequent runs of ``gitlab-ctl reconfigure`` because ``gitlab-ctl reconfigure`` restores the original configuration file.

Expand Down
88 changes: 44 additions & 44 deletions gdi/opentelemetry/automatic-discovery/k8s/k8s-advanced-config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ By default, the Splunk Distribution of OpenTelemetry Collector uses the latest v
enabled: true
operator:
enabled: true
instrumentation:
spec:
java:
repository: ghcr.io/signalfx/splunk-otel-java/splunk-otel-java
tag: v1.27.0
instrumentation:
spec:
java:
repository: ghcr.io/signalfx/splunk-otel-java/splunk-otel-java
tag: v1.27.0
#. Reinstall the Splunk OTel Collector Chart with the following command. Replace <CURRENT_VERSION> with the current version of your splunk-otel-collector-chart.

Expand Down Expand Up @@ -74,25 +74,25 @@ You can configure AlwaysOn Profiling in Kubernetes by editing the values.yaml fi
Follow these steps to activate Profiling for a language:

#. Open the values.yaml file.
#. In the ``operator.instrumentation.spec.<language>.env`` section, add the ``SPLUNK_PROFILER_ENABLED="true"``, ``SPLUNK_PROFILER_MEMORY_ENABLED="true"``, and ``SPLUNK_PROFILER_CALL_STACK_INTERVAL`` environment variables. For example, the following values.yaml file configures AlwaysOn Profiling to sample call stacks from a 5000 millisecond interval:
#. In the ``instrumentation.spec.<language>.env`` section, add the ``SPLUNK_PROFILER_ENABLED="true"``, ``SPLUNK_PROFILER_MEMORY_ENABLED="true"``, and ``SPLUNK_PROFILER_CALL_STACK_INTERVAL`` environment variables. For example, the following values.yaml file configures AlwaysOn Profiling to sample call stacks from a 5000 millisecond interval:

.. code-block:: yaml
operator:
enabled: true
instrumentation:
spec:
nodejs:
env:
# Activates AlwaysOn Profiling for Node.js
- name: SPLUNK_PROFILER_ENABLED
value: "true"
- name: SPLUNK_PROFILER_MEMORY_ENABLED
value: "true"
# Samples call stacks from a 5000 millisecond interval.
# If excluded, samples from a 10000 millisecond interval by default.
- name: SPLUNK_PROFILER_CALL_STACK_INTERVAL
value: 5000
instrumentation:
spec:
nodejs:
env:
# Activates AlwaysOn Profiling for Node.js
- name: SPLUNK_PROFILER_ENABLED
value: "true"
- name: SPLUNK_PROFILER_MEMORY_ENABLED
value: "true"
# Samples call stacks from a 5000 millisecond interval.
# If excluded, samples from a 10000 millisecond interval by default.
- name: SPLUNK_PROFILER_CALL_STACK_INTERVAL
value: 5000
#. Reinstall the Splunk OTel Collector Chart with the following command. Replace <CURRENT_VERSION> with the current version of your splunk-otel-collector-chart.

Expand All @@ -108,36 +108,36 @@ You can activate runtime metrics collection for Java and Node.js applications ru
Follow these steps to activate runtime metrics collection:

#. Open the values.yaml file.
#. In the ``operator.instrumentation.spec.<language>.env`` section, add the ``SPLUNK_METRICS_ENABLED=true`` environment variable. For example, the following values.yaml file activates runtime metrics collection for Java applications:
#. In the ``instrumentation.spec.<language>.env`` section, add the ``SPLUNK_METRICS_ENABLED=true`` environment variable. For example, the following values.yaml file activates runtime metrics collection for Java applications:

.. code-block:: yaml
operator:
enabled: true
instrumentation:
spec:
java:
env:
# Activates runtime metrics collection for Java
- name: SPLUNK_METRICS_ENABLED
value: "true"
instrumentation:
spec:
java:
env:
# Activates runtime metrics collection for Java
- name: SPLUNK_METRICS_ENABLED
value: "true"
#. In the ``operator.instrumentation.spec.env`` section, add the following environment variables and values to configure the endpoint to which the Collector sends runtime metrics:
#. In the ``instrumentation.spec.env`` section, add the following environment variables and values to configure the endpoint to which the Collector sends runtime metrics:

.. code-block:: yaml
operator:
enabled: true
instrumentation:
spec:
env:
- name: SPLUNK_OTEL_AGENT
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
- name: SPLUNK_METRICS_ENDPOINT
value: http://$(SPLUNK_OTEL_AGENT):9943/v2/datapoint
instrumentation:
spec:
env:
- name: SPLUNK_OTEL_AGENT
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
- name: SPLUNK_METRICS_ENDPOINT
value: http://$(SPLUNK_OTEL_AGENT):9943/v2/datapoint
#. Reinstall the Splunk OTel Collector Chart with the following command. Replace <CURRENT_VERSION> with the current version of your splunk-otel-collector-chart.

Expand All @@ -157,7 +157,7 @@ To learn more about the gateway mode, see :ref:`collector-gateway-mode`.
Follow these steps to send data to a gateway endpoint:

#. Open the values.yaml file.
#. Set the ``operator.instrumentation.spec.exporter.endpoint`` value to the gateway endpoint. For example:
#. Set the ``instrumentation.spec.exporter.endpoint`` value to the gateway endpoint. For example:

.. code-block:: yaml
:emphasize-lines: 13
Expand All @@ -170,11 +170,11 @@ Follow these steps to send data to a gateway endpoint:
certmanager:
enabled: true
operator:
enabled: true
instrumentation:
spec:
exporter:
endpoint: <gateway-endpoint>
enabled: true
instrumentation:
spec:
exporter:
endpoint: <gateway-endpoint>
#. Reinstall the Splunk OTel Collector Chart with the following command. Replace <CURRENT_VERSION> with the current version of your splunk-otel-collector-chart.

Expand Down
91 changes: 45 additions & 46 deletions gdi/opentelemetry/automatic-discovery/k8s/k8s-backend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ To properly ingest trace telemetry data, the attribute ``deployment.environment`
* - Through the values.yaml file ``environment`` configuration
- Applies the attribute to all telemetry data (metrics, logs, traces) exported through the collector.
- The chart will set an attribute processor to add ``deployment.environment=prd`` to all telemetry data processed by the collector.
* - Through the values.yaml file and ``operator.instrumentation.spec.env`` or ``operator.instrumentation.spec.{instrumentation_library}.env`` configuration
* - Through the values.yaml file and ``instrumentation.env`` or ``instrumentation.{instrumentation_library}.env`` configuration
- Allows you to set ``deployment.environment`` either for all auto-instrumented applications collectively or per auto-instrumentation language.
- Add the ``OTEL_RESOURCE_ATTRIBUTES`` environment variable, setting its value to ``deployment.environment=prd``.
* - Through your Kubernetes application deployment, daemonset, or pod specification
Expand Down Expand Up @@ -172,15 +172,14 @@ The following examples show how to set the attribute using each method:
operator:
enabled: true
instrumentation:
spec:
env:
- name: OTEL_RESOURCE_ATTRIBUTES
value: "deployment.environment=prd"
java:
env:
- name: OTEL_RESOURCE_ATTRIBUTES
value: "deployment.environment=prd-canary-java"
instrumentation:
env:
- name: OTEL_RESOURCE_ATTRIBUTES
value: "deployment.environment=prd"
java:
env:
- name: OTEL_RESOURCE_ATTRIBUTES
value: "deployment.environment=prd-canary-java"
.. tab:: Deployment YAML

Expand All @@ -191,13 +190,13 @@ The following examples show how to set the attribute using each method:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-java-app
name: my-java-app
spec:
template:
spec:
template:
spec:
containers:
- name: my-java-app
image: my-java-app:latest
image: my-java-app:latest
env:
- name: OTEL_RESOURCE_ATTRIBUTES
value: "deployment.environment=prd"
Expand Down Expand Up @@ -289,10 +288,10 @@ The annotation you set depends on the language runtime you're using. You can set
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-java-app
namespace: monitoring
name: my-java-app
namespace: monitoring
spec:
template:
template:
spec:
containers:
- name: my-java-app
Expand All @@ -306,16 +305,16 @@ The annotation you set depends on the language runtime you're using. You can set
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-java-app
namespace: monitoring
name: my-java-app
namespace: monitoring
spec:
template:
template:
metadata:
annotations:
annotations:
instrumentation.opentelemetry.io/inject-java: "true"
spec:
containers:
- name: my-java-app
containers:
- name: my-java-app
image: my-java-app:latest
.. tab:: .NET
Expand Down Expand Up @@ -351,13 +350,13 @@ The annotation you set depends on the language runtime you're using. You can set
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-dotnet-app
namespace: monitoring
name: my-dotnet-app
namespace: monitoring
spec:
template:
template:
spec:
containers:
- name: my-dotnet-app
containers:
- name: my-dotnet-app
image: my-dotnet-app:latest
Activate automatic discovery by adding ``instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-x64"`` and ``instrumentation.opentelemetry.io/inject-dotnet: "monitoring/splunk-otel-collector"`` to the ``spec``:
Expand All @@ -368,18 +367,18 @@ The annotation you set depends on the language runtime you're using. You can set
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-dotnet-app
namespace: monitoring
name: my-dotnet-app
namespace: monitoring
spec:
template:
template:
metadata:
annotations:
annotations:
instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-x64"
instrumentation.opentelemetry.io/inject-dotnet: "monitoring/splunk-otel-collector"
spec:
spec:
containers:
- name: my-dotnet-app
image: my-dotnet-app:latest
image: my-dotnet-app:latest
.. tab:: ``linux-musl-x64``

Expand Down Expand Up @@ -431,13 +430,13 @@ The annotation you set depends on the language runtime you're using. You can set
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nodejs-app
namespace: monitoring
name: my-nodejs-app
namespace: monitoring
spec:
template:
template:
spec:
containers:
- name: my-nodejs-app
containers:
- name: my-nodejs-app
image: my-nodejs-app:latest
Activate automatic discovery by adding ``instrumentation.opentelemetry.io/inject-nodejs: "true"`` to the ``spec``:
Expand All @@ -448,16 +447,16 @@ The annotation you set depends on the language runtime you're using. You can set
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nodejs-app
namespace: monitoring
name: my-nodejs-app
namespace: monitoring
spec:
template:
template:
metadata:
annotations:
annotations:
instrumentation.opentelemetry.io/inject-nodejs: "true"
spec:
containers:
- name: my-nodejs-app
containers:
- name: my-nodejs-app
image: my-nodejs-app:latest
Applying annotations in a different namespace
Expand Down Expand Up @@ -603,7 +602,7 @@ Allow the Operator to do the work. The Operator intercepts and alters the Kubern

You can configure the Splunk Distribution of OpenTelemetry Collector to suit your instrumentation needs. In most cases, modifying the basic configuration is enough to get started.

You can add advanced configuration like activating custom sampling and including custom data in the reported spans with environment variables and system properties. To do so, use the values.yaml file and ``operator.instrumentation.sampler`` configuration. For more information, see the :new-page:`documentation in GitHub <https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md#instrumentationspecsampler>` and :new-page:`example in GitHub <https://github.com/signalfx/splunk-otel-collector-chart/blob/main/examples/enable-operator-and-auto-instrumentation/instrumentation/instrumentation-add-trace-sampler.yaml>`.
You can add advanced configuration like activating custom sampling and including custom data in the reported spans with environment variables and system properties. To do so, use the values.yaml file and ``instrumentation.sampler`` configuration. For more information, see the :new-page:`documentation in GitHub <https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md#instrumentationspecsampler>` and :new-page:`example in GitHub <https://github.com/signalfx/splunk-otel-collector-chart/blob/main/examples/enable-operator-and-auto-instrumentation/instrumentation/instrumentation-add-trace-sampler.yaml>`.

You can also use the methods shown in :ref:`k8s-auto-discovery-setup-traces` to configure your instrumentation with the ``OTEL_RESOURCE_ATTRIBUTES`` environment variable and other environment variables. For example, if you want every span to include the key-value pair ``build.id=feb2023_v2``, set the ``OTEL_RESOURCE_ATTRIBUTES`` environment variable:

Expand Down

0 comments on commit bf9b317

Please sign in to comment.