Skip to content

Commit

Permalink
dot net
Browse files Browse the repository at this point in the history
  • Loading branch information
Simplychee committed Jul 16, 2024
1 parent ba40d8c commit 8a51e8d
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 390 deletions.
26 changes: 15 additions & 11 deletions docs/_include/general-shipping/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Prerequisites

:::note
You can find your Logz.io configuration tokens, environment IDs, regions, and other required details [here](https://app.logz.io/#/dashboard/integrations/aws-eks).
Your Logz.io configuration tokens, environment IDs, regions, and other required details are [here](https://app.logz.io/#/dashboard/integrations/aws-eks).
:::

* [Helm](https://helm.sh/)
Expand Down Expand Up @@ -37,8 +37,8 @@ logzio-monitoring logzio-helm/logzio-monitoring
```

### Log collection with logzio-fluentd
The `logzio-fluentd` chart is disabled by default in favor of the `logzio-logs-collector` chart for log collection.
Deploy `logzio-fluentd`, by adding the following `--set` flags:
The `logzio-fluentd` chart is disabled by default in favor of the `logzio-logs-collector` chart.
Deploy `logzio-fluentd` by adding the following `--set` flags:

```sh
helm install -n monitoring \
Expand All @@ -64,7 +64,7 @@ If you encounter an issue, see our [troubleshooting guide](https://docs.logz.io/

## Send deployment events logs

Send data about deployment events in the cluster, and how they affect it's resources.
Send data about deployment events in the cluster, and how they affect its resources.
_Supported resource kinds are `Deployment`, `Daemonset`, `Statefulset`, `ConfigMap`, `Secret`, `Service Account`, `Cluster Role` and `Cluster Role Binding`._

```sh
Expand All @@ -87,7 +87,7 @@ logzio-monitoring logzio-helm/logzio-monitoring

### Deployment events versioning

To add a versioning indicator in Kubernetes 360 and Service Overview, include the logzio/commit_url annotation in the resource metadata. The 'View commit' button will link to the commit URL in your version control system (VCS).
To add a versioning indicator in Kubernetes 360 and Service Overview, include the `logzio/commit_url` annotation in the resource metadata. The 'View commit' button will link to the commit URL in your version control system (VCS).


```yaml
Expand Down Expand Up @@ -173,7 +173,9 @@ logzio-monitoring logzio-helm/logzio-monitoring
| `<<SPM-METRICS-SHIPPING-TOKEN>>` | Your [span metrics shipping token](https://app.logz.io/#/dashboard/settings/manage-tokens/data-shipping). |

## Deploy both charts with span metrics and service graph
**Note** `serviceGraph.enabled=true` will have no effect unless `traces.enabled` & `spm.enabled=true` is also set to `true`

**Note:** `serviceGraph.enabled=true` will have no effect unless `traces.enabled` & `spm.enabled=true` is also set to `true`.

```sh
helm install -n monitoring \
--set metricsOrTraces.enabled=true \
Expand All @@ -187,8 +189,10 @@ helm install -n monitoring \
logzio-monitoring logzio-helm/logzio-monitoring
```

#### Deploy metrics chart with Kuberenetes object logs correlation
**Note** `k8sObjectsConfig.enabled=true` will have no effect unless `metrics.enabled` is also set to `true`
#### Deploy metrics chart with Kubernetes object logs correlation

**Note** `k8sObjectsConfig.enabled=true` will have no effect unless `metrics.enabled` is also set to `true`.

```sh
helm install \
--set logzio-k8s-telemetry.metrics.enabled=true \
Expand Down Expand Up @@ -282,7 +286,7 @@ logzio-monitoring logzio-helm/logzio-monitoring

## Handling image pull rate limit

To avoid Docker Hub pull rate limits, which could result in the following error: `You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limits`, use the `--set` commands below to access an alternative image repository:
Docker Hub pull rate limits could result in the following error: `You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limits`. To avoid this, use the `--set` commands below to access an alternative image repository:

```shell
--set logzio-k8s-telemetry.image.repository=ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib
Expand All @@ -296,7 +300,7 @@ To avoid Docker Hub pull rate limits, which could result in the following error:

Before upgrading your logzio-monitoring chart to v3.0.0 with `helm upgrade`, you might encounter errors with some logzio-telemetry sub-charts.

You have two options to proceed:
You have two options:

- Reinstall the chart.
- Before running `helm upgrade`, delete the old subcharts resources: `logzio-monitoring-prometheus-pushgateway` deployment and the `logzio-monitoring-prometheus-node-exporter` daemonset.
Expand All @@ -319,7 +323,7 @@ Set up a log processor to parse JSON logs:

## Adding metric names to Kubernetes 360 filter

To customize Prometheus metrics in your Kubernetes environment, you need to modify the `prometheusFilters` configuration in your Helm chart.
Customize Prometheus metrics in your Kubernetes environment by modifying the `prometheusFilters` configuration in your Helm chart.

**1. Identify metrics to keep**

Expand Down
2 changes: 1 addition & 1 deletion docs/_include/metric-shipping/custom-dashboard.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Log in to your Logz.io account and navigate to the current instructions page [inside the Logz.io app](https://app.logz.io/#/dashboard/send-your-data/prometheus-sources/{{page.slug}}).
Navigate to the instructions page within [the Logz.io app](https://app.logz.io/#/dashboard/send-your-data/prometheus-sources/{{page.slug}}).
11 changes: 9 additions & 2 deletions docs/_include/tracing-shipping/collector-run-note.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
:::note
Normally, when you run the OTEL collector in a Docker container, your application will run in separate containers on the same host. In this case, you need to make sure that all your application containers share the same network as the OTEL collector container. One way to achieve this, is to run all containers, including the OTEL collector, with a Docker-compose configuration. Docker-compose automatically makes sure that all containers with the same configuration are sharing the same network.
:::
When running the OTEL collector in a Docker container, your application should run in separate containers on the same host network. **Ensure all containers share the same network**. Using Docker Compose ensures that all containers, including the OTEL collector, share the same network configuration automatically.
:::







11 changes: 4 additions & 7 deletions docs/_include/tracing-shipping/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ service:
{@include: ../../_include/tracing-shipping/replace-tracing-token.html}
##### Tail Sampling
### Tail Sampling
{@include: ../../_include/tracing-shipping/tail-sampling.md}
Expand Down Expand Up @@ -158,14 +158,11 @@ service:
{@include: ../../_include/tracing-shipping/replace-tracing-token.html}


{@include: ../../_include/tracing-shipping/tail-sampling.md}


##### Run the container
#### Run the container

Mount the `config.yaml` as volume to the `docker run` command and run it as follows.

###### Linux
##### Linux

```
docker run \
Expand All @@ -177,7 +174,7 @@ otel/opentelemetry-collector-contrib:0.78.0
Replace `<PATH-TO>` to the path to the `config.yaml` file on your system.
###### Windows
##### Windows
```
docker run \
Expand Down
4 changes: 2 additions & 2 deletions docs/_include/tracing-shipping/dotnet-steps.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Download instrumentation packages
#### Download instrumentation packages

Run the following command from the application directory:

Expand All @@ -9,7 +9,7 @@ dotnet add package OpenTelemetry.Instrumentation.AspNetCore
dotnet add package OpenTelemetry.Extensions.Hosting
```

##### Enable instrumentation in the code
#### Enable instrumentation in the code

Add the following configuration to the beginning of the Startup.cs file:

Expand Down
9 changes: 5 additions & 4 deletions docs/_include/tracing-shipping/tail-sampling.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
The `tail_sampling` defines the decision to sample a trace after the completion of all the spans in a request. By default, this configuration collects all traces that have a span that was completed with an error, all traces that are slower than 1000 ms, and 10% of the rest of the traces.
`tail_sampling` defines which traces to sample after all spans in a request are completed. By default, it collects all traces with an error span, traces slower than 1000 ms, and 10% of all other traces.

You can add more policy configurations to the processor. For more on this, refer to [OpenTelemetry Documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/tailsamplingprocessor/README.md).

Additional policy configurations can be added to the processor. For more details, refer to the [OpenTelemetry Documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/tailsamplingprocessor/README.md).

The configurable parameters in the Logz.io default configuration are:

| Parameter | Description | Default |
|---|---|---|
| threshold_ms | Threshold for the span latency - all traces slower than the threshold value will be filtered in. | 1000 |
| sampling_percentage | Sampling percentage for the probabilistic policy. | 10 |
| threshold_ms | Threshold for the span latency - traces slower than this value will be included. | 1000 |
| sampling_percentage | Percentage of traces to sample using the probabilistic policy. | 10 |
Loading

0 comments on commit 8a51e8d

Please sign in to comment.