-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update NuGet packages * Dump version to 1.2.0 * Add authentication with Azure AD * Update tests * Improve docs * Add observability docker files * Add OpenTelemetry in .net projects * Add OpenTelemetry service config value * Add additional demo services for observability * Update line ending * Add tags to activity * Fix unit test * Remove IIS parameters in launch settings * Rollback OpenTelemetry packages to RC8 (Issue with Metrics with RC9) * Add first metrics and validate correct forwarding to exporter * Update pipeline for manual execution
- Loading branch information
Showing
56 changed files
with
896 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: 1 | ||
|
||
datasources: | ||
- name: Prometheus | ||
type: prometheus | ||
access: proxy | ||
orgId: 1 | ||
url: http://prometheus:9090 | ||
basicAuth: false | ||
isDefault: false | ||
version: 1 | ||
editable: false | ||
- name: Tempo | ||
type: tempo | ||
access: proxy | ||
orgId: 1 | ||
url: http://tempo:3200 | ||
basicAuth: false | ||
isDefault: false | ||
version: 1 | ||
editable: false | ||
apiVersion: 1 | ||
uid: tempo | ||
- name: Loki | ||
type: loki | ||
access: proxy | ||
orgId: 1 | ||
url: http://loki:3100 | ||
basicAuth: false | ||
isDefault: true | ||
version: 1 | ||
editable: false | ||
apiVersion: 1 | ||
jsonData: | ||
derivedFields: | ||
- datasourceUid: tempo | ||
matcherRegex: (?:"traceid"):"(\w+)" | ||
name: TraceID | ||
url: $${__value.raw} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
|
||
exporters: | ||
prometheus: | ||
endpoint: "0.0.0.0:8889" | ||
logging: | ||
zipkin: | ||
endpoint: "http://zipkin:9411/api/v2/spans" | ||
format: proto | ||
file: | ||
path: /etc/output/logs.json | ||
otlp: | ||
endpoint: tempo:4317 | ||
tls: | ||
insecure: true | ||
loki: | ||
endpoint: "http://loki:3100/loki/api/v1/push" | ||
format: json | ||
labels: | ||
resource: | ||
service.name: "service_name" | ||
service.instance.id: "service_instance_id" | ||
|
||
processors: | ||
batch: | ||
|
||
service: | ||
pipelines: | ||
logs: | ||
receivers: [otlp] | ||
exporters: [logging, file, loki] | ||
metrics: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [logging, prometheus] | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [logging, zipkin, otlp] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
scrape_configs: | ||
- job_name: 'otel-collector' | ||
scrape_interval: 10s | ||
static_configs: | ||
- targets: ['otel-collector:8889'] | ||
- targets: ['otel-collector:8888'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
server: | ||
http_listen_port: 3200 | ||
|
||
distributor: | ||
receivers: | ||
otlp: | ||
protocols: | ||
http: | ||
grpc: | ||
|
||
storage: | ||
trace: | ||
backend: local | ||
local: | ||
path: /tmp/tempo/blocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -358,3 +358,6 @@ Local.md | |
# GitLab runner files | ||
/builds/ | ||
/.gitlab/runner/local/ | ||
|
||
# Local build and log files | ||
/output/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
version: "3.9" | ||
services: | ||
zipkin: | ||
image: openzipkin/zipkin:latest | ||
container_name: zipkin | ||
ports: | ||
- "9411:9411" | ||
|
||
otel-collector: | ||
image: otel/opentelemetry-collector-contrib:latest | ||
container_name: otel-collector | ||
command: ["--config=/etc/otel-collector.yml"] | ||
volumes: | ||
- ./.docker/opentelemetry-collector.yml:/etc/otel-collector.yml | ||
- ./output:/etc/output:rw | ||
ports: | ||
- "8888:8888" # prometheus metrics | ||
- "8889:8889" # prometheus exporter | ||
- "4317:4317" # oltp grpc receiver | ||
depends_on: | ||
- zipkin | ||
- grafana | ||
|
||
prometheus: | ||
image: prom/prometheus:latest | ||
container_name: prometheus | ||
volumes: | ||
- ./.docker/prometheus.yml:/etc/prometheus/prometheus.yml | ||
ports: | ||
- "9090:9090" | ||
|
||
tempo: | ||
image: grafana/tempo:latest | ||
container_name: tempo | ||
command: [ "-config.file=/etc/tempo.yaml" ] | ||
volumes: | ||
- ./.docker/tempo.yaml:/etc/tempo.yaml | ||
ports: | ||
- "3200:3200" | ||
|
||
loki: | ||
image: grafana/loki:2.4.2 | ||
container_name: loki | ||
command: [ "-config.file=/etc/loki/local-config.yaml" ] | ||
ports: | ||
- "3100:3100" | ||
|
||
grafana: | ||
image: grafana/grafana:latest | ||
container_name: grafana | ||
ports: | ||
- "3000:3000" | ||
volumes: | ||
- ./.docker/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml | ||
environment: | ||
- GF_AUTH_ANONYMOUS_ENABLED=true | ||
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin | ||
- GF_AUTH_DISABLE_LOGIN_FORM=true | ||
depends_on: | ||
- prometheus | ||
- loki | ||
- tempo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Authentication | ||
|
||
## How to secure an ASP.NET application with Azure AD | ||
|
||
* In [Azure Portal](https://portal.azure.com/), in "Azure Active Directory > Application registrations", | ||
select "New registration" | ||
* Only the same is mandatory | ||
* Once created, the application is displayed | ||
* Save the values of "Application (client) ID", "Directory (tenant) ID" | ||
* Update the application | ||
* "Manifest": manually edit the content (`accessTokenAcceptedVersion` and `allowPublicClient` are null by default) | ||
|
||
```json | ||
{ | ||
"accessTokenAcceptedVersion": 2, | ||
"allowPublicClient": true, | ||
} | ||
``` | ||
|
||
* "Certificates & secrets": in "Client Secrets", add a new secret and save the secret value | ||
* "Api permissions": do "Grant admin consent for Default Directory" (Microsoft Graph > User.Read has been added by default) | ||
* "Expose an API": set the application ID URI, "api://<client_id>" is the default and correct choice | ||
* "Expose an API": add a scope, for example "access_as_user" with "Admins and users" for the consent option | ||
|
||
* References: | ||
* [Scenario: Protected web API](https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-protected-web-api-overview) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# ServiceNow resources | ||
# Dependencies resources | ||
|
||
### ServiceNow | ||
|
||
## General | ||
|
||
|
Oops, something went wrong.