Merge pull request #975 from dapr/docs-hygine-20201203

Docs merge from master 2020-12-03
This commit is contained in:
Ori Zohar 2020-12-03 10:08:50 -08:00 committed by GitHub
commit f88cdc911d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 383 additions and 79 deletions

View File

@ -1,31 +0,0 @@
---
name: Bug report
about: Report a bug in Dapr docs
title: ''
labels: kind/bug
assignees: ''
---
## Expected Behavior
<!-- Briefly describe what you expect to happen -->
## Actual Behavior
<!-- Briefly describe what is actually happening -->
## Steps to Reproduce the Problem
<!-- How can a maintainer reproduce this issue (be detailed) -->
## Release Note
<!-- How should the fix for this issue be communicated in our release notes? It can be populated later. -->
<!-- Keep it as a single line. Examples: -->
<!-- RELEASE NOTE: **ADD** New feature in Dapr. -->
<!-- RELEASE NOTE: **FIX** Bug in runtime. -->
<!-- RELEASE NOTE: **UPDATE** Runtime dependency. -->
RELEASE NOTE:

View File

@ -1,8 +0,0 @@
---
name: Feature Request
about: Start a discussion for Dapr docs
title: ''
labels: kind/discussion
assignees: ''
---

View File

@ -1,19 +0,0 @@
---
name: Feature Request
about: Create a Feature Request for Dapr docs
title: ''
labels: kind/enhancement
assignees: ''
---
## Describe the feature
## Release Note
<!-- How should this new feature be announced in our release notes? It can be populated later. -->
<!-- Keep it as a single line. Examples: -->
<!-- RELEASE NOTE: **ADD** New feature in Dapr. -->
<!-- RELEASE NOTE: **FIX** Bug in runtime. -->
<!-- RELEASE NOTE: **UPDATE** Runtime dependency. -->
RELEASE NOTE:

View File

@ -0,0 +1,20 @@
---
name: New Content Needed
about: Topic is missing and needs to be written
title: "[CONTENT]"
labels: content/missing-information
assignees: ''
---
**What content needs to be created or modified?**
A clear and concise description of what the problem is. Ex. There should be docs on how pub/sub works...
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Where should the new material be placed?**
Please suggest where in the docs structure the new content should be created.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -1,9 +0,0 @@
---
name: Proposal
about: Create a proposal for Dapr docs
title: ''
labels: kind/proposal
assignees: ''
---
## Describe the proposal

View File

@ -1,9 +0,0 @@
---
name: Question
about: Ask a question about Dapr docs
title: ''
labels: kind/question
assignees: ''
---
## Ask your question here

23
.github/ISSUE_TEMPLATE/typo.md vendored Normal file
View File

@ -0,0 +1,23 @@
---
name: Typo
about: Report incorrect language/small updates to fix readability
title: "[TYPO]"
labels: content/typo
assignees: ''
---
**URL of the docs page**
The URL(s) on docs.dapr.io where the typo occurs
**How is it currently worded?**
Please copy and paste the sentence where the typo occurs.
**How should it be worded?**
Please correct the sentence
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

38
.github/ISSUE_TEMPLATE/website-issue.md vendored Normal file
View File

@ -0,0 +1,38 @@
---
name: Website Issue
about: The website is broken or not working correctly.
title: "[WEBSITE]"
labels: website/functionality
assignees: AaronCrawfis
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,23 @@
---
name: Wrong Information/Code/Steps
about: Something in the docs is incorrect
title: "[CONTENT]"
labels: P1, content/incorrect-information
assignees: ''
---
**Describe the issue**
A clear and concise description of what the bug is.
**URL of the docs**
Paste the URL (docs.dapr.io/concepts/......) of the page
**Expected content**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@ -111,9 +111,9 @@ sidebar_search_disable = true
icon = "fab fa-github"
desc = "Development takes place here!"
[[params.links.developer]]
name = "Gitter"
url = "https://gitter.im/Dapr/community"
icon = "fab fa-gitter"
name = "Discord"
url = "https://aka.ms/dapr-discord"
icon = "fab fa-discord"
desc = "Conversations happen here!"
[[params.links.developer]]
name = "Zoom"

View File

@ -0,0 +1,159 @@
---
type: docs
title: "How-To: Set up Jaeger for distributed tracing"
linkTitle: "Jaeger"
weight: 3000
description: "Set up Jaeger for distributed tracing"
type: docs
---
Dapr currently supports two kind of tracing protocol: OpenCensus and
Zipkin. Since Jaeger is compatible with Zipkin, the Zipkin
protocol can be used to talk to Jaeger.
## Configure self hosted mode
### Setup
The simplest way to start Jaeger is to use the pre-built all-in-one
Jaeger image published to DockerHub:
```bash
docker run -d --name jaeger \
-e COLLECTOR_ZIPKIN_HTTP_PORT=9412 \
-p 16686:16686 \
-p 9412:9412 \
jaegertracing/all-in-one:1.21
```
Next, create the following YAML files locally:
* **jaeger.yaml**: Note that because we are using the Zipkin protocol to talk to Jaeger,
the type of the exporter in the YAML file below is `exporter.zipkin`,
while the `exporterAddress` is the address of the Jaeger instance.
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: zipkin
spec:
type: exporters.zipkin
metadata:
- name: enabled
value: "true"
- name: exporterAddress
value: "http://localhost:9412/api/v2/spans"
```
To launch the application referring to the new YAML file, you can use
`--components-path`. Assuming that, the **jaeger.yaml** file is in the
current directory, you can use
```bash
dapr run --app-id mynode --app-port 3000 node app.js --components-path .
```
### Viewing Traces
To view traces, in your browser go to http://localhost:16686 and you
will see the Zipkin UI.
## Configure Kubernetes
The following steps shows you how to configure Dapr to send distributed tracing data to Jaeger running as a container in your Kubernetes cluster, how to view them.
### Setup
First create the following YAML file to install Jaeger
* jaeger-operator.yaml
```yaml
apiVersion: jaegertracing.io/v1
kind: "Jaeger"
metadata:
name: "jaeger"
spec:
strategy: allInOne
ingress:
enabled: false
allInOne:
image: jaegertracing/all-in-one:1.13
options:
query:
base-path: /jaeger
```
Now, use the above YAML file to install Jaeger
```bash
# Install Jaeger
helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
helm install jaeger-operator jaegertracing/jaeger-operator
kubectl apply -f jaeger-operator.yaml
# Wait for Jaeger to be up and running
kubectl wait deploy --selector app.kubernetes.io/name=jaeger --for=condition=available
```
Next, create the following YAML files locally:
* **jaeger.yaml**: Note that because we are using the Zipkin protocol to talk to Jaeger,
the type of the exporter in the YAML file below is `exporter.zipkin`,
while the `exporterAddress` is the address of the Jaeger instance.
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: zipkin
spec:
type: exporters.zipkin
metadata:
- name: enabled
value: "true"
- name: exporterAddress
value: "http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans"
```
* **tracing.yaml**
```yaml
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: tracing
namespace: default
spec:
tracing:
samplingRate: "1"
```
Finally, deploy the the Dapr component and configuration files:
```bash
kubectl apply -f tracing.yaml
kubectl apply -f jaeger.yaml
```
In order to enable this configuration for your Dapr sidecar, add the following annotation to your pod spec template:
```yml
annotations:
dapr.io/config: "tracing"
```
That's it! your sidecar is now configured for use with Jaeger.
### Viewing Tracing Data
To view traces, connect to the Jaeger Service and open the UI:
```bash
kubectl port-forward svc/jaeger-query 16686
```
In your browser, go to `http://localhost:16686` and you will see the Jaeger UI.
![jaeger](/images/jaeger_ui.png)
## References
- [Jaeger Getting Started](https://www.jaegertracing.io/docs/1.21/getting-started/#all-in-one)
- [W3C distributed tracing]({{< ref w3c-tracing >}})

View File

@ -0,0 +1,117 @@
---
type: docs
title: "How-To: Set-up New Relic for Dapr observability"
linkTitle: "New Relic"
weight: 2000
description: "Set-up New Relic for Dapr observability"
---
## Prerequisites
- Perpetually [free New Relic account](https://newrelic.com/signup), 100 GB/month of free data ingest, 1 free full access user, unlimited free basic users
## Configure Zipkin Exporter
Dapr natively captures metrics and traces that can be send directly to New Relic. The easiest way to export these is by providing a Zipkin exporter configured to send the traces to [New Relic's Trace API](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-zipkin-format-traces-trace-api#existing-zipkin).
In order for the integration to send data to New Relic [Telemetry Data Platform](https://newrelic.com/platform/telemetry-data-platform), you need a [New Relic Insights Insert API key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#insights-insert-key).
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: zipkin
namespace: default
spec:
type: exporters.zipkin
metadata:
- name: enabled
value: "true"
- name: exporterAddress
value: "https://trace-api.newrelic.com/trace/v1?Api-Key=<NR-INSIGHTS-INSERT-API-KEY>&Data-Format=zipkin&Data-Format-Version=2"
```
### Viewing Traces
New Relic Distributed Tracing overview
![New Relic Kubernetes Cluster Explorer App](/images/nr-distributed-tracing-overview.png)
New Relic Distributed Tracing details
![New Relic Kubernetes Cluster Explorer App](/images/nr-distributed-tracing-detail.png)
## (optional) New Relic Instrumentation
In order for the integrations to send data to New Relic Telemetry Data Platform, you either need a [New Relic license key](https://docs.newrelic.com/docs/accounts/accounts-billing/account-setup/new-relic-license-key) or [New Relic Insights Insert API key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#insights-insert-key).
### OpenTelemetry instrumentation
Leverage the different language specific OpenTelemetry implementations, for example [New Relic Telemetry SDK and OpenTelemetry support for .NET](https://github.com/newrelic/newrelic-telemetry-sdk-dotnet). In this case, use the [OpenTelemetry Trace Exporter](https://github.com/newrelic/newrelic-telemetry-sdk-dotnet/tree/main/src/NewRelic.OpenTelemetry). See example [here](https://github.com/harrykimpel/quickstarts/blob/master/distributed-calculator/csharp-otel/Startup.cs).
### New Relic Language agent
Similarly to the OpenTelemetry instrumentation, you can also leverage a New Relic language agent. As an example, the [New Relic agent instrumentation for .NET Core](https://docs.newrelic.com/docs/agents/net-agent/installation/install-docker-container) is part of the Dockerfile. See example [here](https://github.com/harrykimpel/quickstarts/blob/master/distributed-calculator/csharp/Dockerfile).
## (optional) Enable New Relic Kubernetes integration
In case Dapr and your applications run in the context of a Kubernetes environment, you can enable additional metrics and logs.
The easiest way to install the New Relic Kubernetes integration is to use the [automated installer](https://one.newrelic.com/launcher/nr1-core.settings?pane=eyJuZXJkbGV0SWQiOiJrOHMtY2x1c3Rlci1leHBsb3Jlci1uZXJkbGV0Lms4cy1zZXR1cCJ9) to generate a manifest. It bundles not just the integration DaemonSets, but also other New Relic Kubernetes configurations, like [Kubernetes events](https://docs.newrelic.com/docs/integrations/kubernetes-integration/kubernetes-events/install-kubernetes-events-integration), [Prometheus OpenMetrics](https://docs.newrelic.com/docs/integrations/prometheus-integrations/get-started/new-relic-prometheus-openmetrics-integration-kubernetes), and [New Relic log monitoring](https://docs.newrelic.com/docs/logs).
### New Relic Kubernetes Cluster Explorer
The [New Relic Kubernetes Cluster Explorer](https://docs.newrelic.com/docs/integrations/kubernetes-integration/understand-use-data/kubernetes-cluster-explorer) provides a unique visualization of the entire data and deployments of the data collected by the Kubernetes integration.
It is a good starting point to observe all your data and dig deeper into any performance issues or incidents happening inside of the application or microservices.
![New Relic Kubernetes Cluster Explorer App](/images/nr-k8s-cluster-explorer-app.png)
Automated correlation is part of the visualization capabilities of New Relic.
### Pod-level details
![New Relic K8s Pod Level Details](/images/nr-k8s-pod-level-details.png)
### Logs in Context
![New Relic K8s Logs In Context](/images/nr-k8s-logs-in-context.png)
## New Relic Dashboards
### Kubernetes Overview
![New Relic Dashboard Kubernetes Overview](/images/nr-dashboard-k8s-overview.png)
### Dapr System Services
![New Relic Dashboard Dapr System Services](/images/nr-dashboard-dapr-system-services.png)
### Dapr Metrics
![New Relic Dashboard Dapr Metrics 1](/images/nr-dashboard-dapr-metrics-1.png)
## New Relic Grafana integration
New Relic teamed up with [Grafana Labs](https://grafana.com/) so you can use the [Telemetry Data Platform](https://newrelic.com/platform/telemetry-data-platform) as a data source for Prometheus metrics and see them in your existing dashboards, seamlessly tapping into the reliability, scale, and security provided by New Relic.
[Grafana dashboard templates](https://github.com/dapr/dapr/blob/227028e7b76b7256618cd3236d70c1d4a4392c9a/grafana/README.md) to monitor Dapr system services and sidecars can easily be used without any changes. New Relic provides a [native endpoint for Prometheus metrics](https://docs.newrelic.com/docs/integrations/grafana-integrations/set-configure/configure-new-relic-prometheus-data-source-grafana) into Grafana. A datasource can easily be set-up:
![New Relic Grafana Data Source](/images/nr-grafana-datasource.png)
And the exact same dashboard templates from Dapr can be imported to visualize Dapr system services and sidecars.
![New Relic Grafana Dashboard](/images/nr-grafana-dashboard.png)
## New Relic Alerts
All the data that is collected from Dapr, Kubernetes or any services that run on top of can be used to set-up alerts and notifications into the preferred channel of your choice. See [Alerts and Applied Intelligence](https://docs.newrelic.com/docs/alerts-applied-intelligence).
## Related Links/References
* [New Relic Account Signup](https://newrelic.com/signup)
* [Telemetry Data Platform](https://newrelic.com/platform/telemetry-data-platform)
* [Distributed Tracing](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/get-started/introduction-distributed-tracing)
* [New Relic Trace API](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api)
* [New Relic Metric API](https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api)
* [Types of New Relic API keys](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys)
* [New Relic OpenTelemetry User Experience](https://blog.newrelic.com/product-news/opentelemetry-user-experience/)
* [Alerts and Applied Intelligence](https://docs.newrelic.com/docs/alerts-applied-intelligence)

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB