diff --git a/index.html b/index.html index de0ce350..473d4cab 100644 --- a/index.html +++ b/index.html @@ -647,7 +647,7 @@
Monolith Otel Collector & Host based applications
- Node.js / Linux
-- Python / Linux
+- Python / Linux
- .NET / Windows
These workshops are designed to help learn and practice observability and practice integrations to the Coralogix platform. They include reference implementations that are easy to deploy and understand.
These workshops are not documentation- Coralogix platform documentation is located here
"},{"location":"#opentelemetry-info","title":"OpenTelemetry Info","text":"OpenTelemetry Overview and Value Proposition
"},{"location":"#workshops","title":"Workshops","text":""},{"location":"#apm-application-perfomance-measurement-reference-examples-and-training","title":"APM - Application Perfomance Measurement Reference Examples and Training","text":""},{"location":"#microservices","title":"Microservices","text":"Kubernetes (Python, Java) - Kubernetes OpenTelemetry Collector for metrics/traces/logs - OpenTelemetry tracing instrumentation for containerized Python and Java apps - Prometheus custom metrics collection - Sample \"bad\" deployment and errors
AWS ECS Fargate (Python) - 2x container microservice, OpenTelemetry Collector, Firelens log router - Complete Fargate task and ECS config instructions
"},{"location":"#monolith","title":"Monolith","text":"Monolith Otel Collector & Host based applications - Node.js / Linux - Python / Linux - .NET / Windows
"},{"location":"otel/about-opentelemetry/","title":"Overview and Value Proposition","text":""},{"location":"otel/about-opentelemetry/#opentelemetry","title":"OpenTelemetry","text":"OpenTelemetry is a standard organized by the Cloud Native Compute Foundation
The Cloud Native Compute Foundation publishes standards like Kubernetes and others that are the leading standards in the industry.
OpenTelemetry is comprised of two key elements: - A standard format for metrics, logs, and traces as well as standard protocols for shipping them - OpenTelemetry Software \u00a0\u00a0- OpenTelemetry Collector which can run anywhere (host/container/local) and receives, processes, and exports telemetry \u00a0\u00a0- OpenTelemetry Tracing Instrumentation for many languages that instruments your apps to emit traces and works in two ways \u00a0\u00a0\u00a0\u00a01. Automatic Instrumentation with no code changes and instruments a long list of frameworks for each language \u00a0\u00a0\u00a0\u00a02. Manual Instrumentation that is added to your code for fine grain trace span building
"},{"location":"otel/about-opentelemetry/#why-opentelemetry-because-observability-should-use-universal-standards","title":"Why OpenTelemetry? Because Observability Should Use Universal Standards","text":"Observability means measuring a system based on its outputs.
This is contrast to installing proprietary software for monitoring/remediation purposes- if a system can simply emit telemetry natively, software is no longer needed.
In a complex environment consisting of servers, containers, cloud, many application languages, and mixes and variations of all of the above, Observability is required to be able to proactively and/or in real time discover and repair problems however sytems are so diverse that traditional post-problem find/fix monitoring solutions no longer function or are scalable.
Monitoring systems traditionally required negotiation with vendors to supply \"monitoring software\" and \"agents\" that are threaded througout an environment. This means annual negotiations are required to keep a business online because technical debt of vendor relationships has to be cured on a regular basis. As systems grow larger and more distributed and complex, the private vendor lock on monitoring creates a fatal reliability flaw in the tech stack.
No one negotiates for HTTP, SQL, HTTPS, TCP etc every year- so why should anyone negotiative for observability formats and agents? These should be based open standards and included as part of day-to-day system building and operations.
OpenTelemetry formats and tracing instrumentation allow for devops, operations, and development to scale infinitely without worry of vendor lock-in or future risk to an environment due to proprietary software.
"},{"location":"otel/microservices-fargate/","title":"OpenTelemetry for AWS ECS Fargate - Microservice Example","text":""},{"location":"otel/microservices-fargate/#instructions","title":"Instructions","text":"This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - AWS Account - Intermediate to Advanced skill with ECS-Fargate - Sufficient permissions to configure AWS - Proper IDE i.e. Visual Studio Code
"},{"location":"otel/microservices-fargate/#step-1-setup","title":"Step 1 - Setup","text":"Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/microservices-fargate/#step-2-change-to-workshop-dir","title":"Step 2 - Change to workshop dir","text":"Change to the proper directory for workshop example:
cd ./workshops/workshops/otel/ecs-fargate\n
"},{"location":"otel/microservices-fargate/#step-3-prep-requirements","title":"Step 3: Prep Requirements","text":"1 - Put the following file in an S3 bucket: https://github.com/coralogix/telemetry-shippers/blob/master/logs/fluent-bit/ecs-fargate/base_filters.conf
2 - Put the following in a Systems Manager Parameter Store: https://github.com/coralogix/telemetry-shippers/blob/master/otel-ecs-fargate/config.yaml
3 - Create a role called ecsTaskExecutionRole
that contains the AWS managed AmazonECSTaskExecutionRolePolicy
and two example policies from this workshop: ecs-policy-s3-access.json
ecs-policy-secrets-access.json
These two policies should be tuned for your own production security needs when going into production.
"},{"location":"otel/microservices-fargate/#step-4-prep-register-task","title":"Step 4: Prep / Register Task","text":"Prep example Task: aws-fargate-otel-demo.json
Update all 14 locations replacing contents bewteen < >
and removing those brackets but leaving the quotes: adding task execution role, key, domain, S3 ARN, Systems Parameter etc...
Once prepped the task can be registered and made into a service.
"},{"location":"otel/microservices-fargate/#step-5-launch-task","title":"Step 5: Launch Task","text":"Launch according to your standard procedure.
The task creates the following containers: - two microservices (Client/Server) - FireLens log router - Otel collector
The microservice containers create a Python HTTP client and server that will generate spans and logs and send to Coralogix.
"},{"location":"otel/microservices-fargate/#step-6-study-results-in-coralogix-portal","title":"Step 6 - Study results in Coralogix portal","text":"The shell scripts show how a the microservices example.
"},{"location":"otel/microservices-workshop/","title":"OpenTelemetry Microservices / Kubernetes","text":""},{"location":"otel/microservices-workshop/#instructions","title":"Instructions","text":"This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - Kubernetes cluster that can be used as a sandbox environment - Updated versions and sufficient permissions for helm
and kubectl
- Proper IDE i.e. Visual Studio Code
See Appendix below for a suggested Kubernetes sandbox environment with a quick and easy setup
"},{"location":"otel/microservices-workshop/#step-1-install-the-opentelemetry-collector-on-your-k8s-cluster","title":"Step 1 - Install the OpenTelemetry Collector on your k8s cluster","text":"This workshop requires OpenTelemetry Collector configured for Coralogix: https://github.com/coralogix/telemetry-shippers/tree/master/otel-integration/k8s-helm/
Note that Coralogix makes several examples of the Collector helm charts available- the one above is the fully featured chart with Kube State Metrics
etc.
It requires a values.yaml
file as follows:
---\nglobal:\n domain: \"YourCoralogix.domain-i.e.-coralogix.us\"\n clusterName: \"YourClusterName\"\n
"},{"location":"otel/microservices-workshop/#step-2-setup","title":"Step 2 - Setup","text":"Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/microservices-workshop/#step-3-change-to-workshop-dir","title":"Step 3 - Change to workshop dir","text":"Change to the proper directory for workshop example:
cd workshops/workshops/otel/microservices-demo\n
"},{"location":"otel/microservices-workshop/#step-4-deploy-example","title":"Step 4 - Deploy example","text":"Deploy example to your k8s cluster- this will deploy to the default k8s namespace. If you want to change the namespace, edit yaml/deploy-good.yaml
There will be three services spun up:
cx-shopping-cart-reqs
- a requesting service initiating a transaction cx-payment-gateway-flask
- a server that is a bridge for a transaction to a database- returns a transaction ID to the shopping-cart
cx-redis
- an instance of a redis database used for a transactionsource deploy-all.sh\n
Deploys the following as seen from the http://cx-payment-gateway-flask:5000/
root span:
With healthy low latency spans for all services:
"},{"location":"otel/microservices-workshop/#step-5-study-results-and-simulate-cicd-scenarios","title":"Step 5 - Study results and simulate CI/CD scenarios","text":"
Study results in Coralogix portal
Simulate a \"bad\" deployment:
source deploy-reqs-bad.sh\n
This deployment will cause severe sporadic problems in payment-gateway
such as 404s, a log key:value 'transaction': 'failed',
and latency in the service response along with a drop in transaction volume. You can see the latency spikes here:
Alerts and automation can be built around span latency or Payment Gateway 404 responses.
Roll back the bad deployment for the services to return to normal:
source deploy-reqs-good.sh\n
Span latency will return to normal and Payment Gateway 404 responses will cease.
Study how the example is built: - The Python apps that drive this example are in the python/apps
dir - .yaml
deployment files are in python/yaml
- Dockerfiles for the containers show how the OpenTelemetry instrumentation works and are in the /python
root level
Deploy Java based Inventory service:
source deploy-java.sh\n
Prometheus metrics example:
source deploy-prometheus.sh\n
CustomGauge
with value 17 will now be available helm upgrade --reuse-values otel-coralogix-integration coralogix-charts-virtual/otel-integration --values ./yaml/override-prometheus.yaml \n
env:dev
to the CustomGauge
metric: helm upgrade --reuse-values otel-coralogix-integration coralogix-charts-virtual/otel-integration --values ./yaml/override-attr.yaml\n
CustomGauge
to clean up extra metrics- but leave the env:dev
label:helm upgrade --reuse-values otel-coralogix-integration coralogix-charts-virtual/otel-integration --values ./yaml/override-attr-drop.yaml\n
"},{"location":"otel/microservices-workshop/#step-6-cleanup","title":"Step 6 - Cleanup","text":"To remove all the deployments/services/pods from the example from your k8s cluster (ignore any errors it reports:
source delete-all.sh\n
"},{"location":"otel/microservices-workshop/#appendix-quick-kubernetes-sandbox-setup","title":"Appendix - Quick Kubernetes Sandbox Setup","text":"sudo chmod 644 /etc/rancher/k3s/k3s.yaml && export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
This script is included in the workshop in the k3s folder: source ./k3s/k3s.sh
This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - Linux host (Debian preferred but RPM flavors will work) - Updated versions and sufficient permissions for installing software - Updated verson of node
and npm
installed https://nodejs.org/ - Proper IDE i.e. Visual Studio Code
Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/monolith-workshop/node/#step-2-change-to-workshop-dir","title":"Step 2 - Change to workshop dir","text":"Change to the proper directory for workshop example:
cd ./workshops/workshops/otel/monolith-workshop/node/\n
"},{"location":"otel/monolith-workshop/node/#step-3-set-up-otel-collector-on-a-linux-host","title":"Step 3 - Set up Otel Collector on a Linux host","text":"Download and install latest CONTRIB release version from here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases
Collector config.yaml
must be configured with Coralogix Exporter. See the \"Send Data to Coralogix\" section for determining telemetry endpoint and and API key: https://coralogix.com/docs/guide-first-steps-coralogix/
See the config.yaml
example in ./workshops/workshops/otel/monolith-workshop/node/otelcol
This file can be updated in /etc/otelcol/contrib/config.yaml
- make a backup of the default version first.
Manage the collector using systemctl
i.e. sudo systemctl restart otelcol
More info is here: https://coralogix.com/docs/guide-first-steps-coralogix/
You can check Collector status with these status URLS: http://localhost:55679/debug/tracez
http://localhost:55679/debug/pipelinez
For more info: zpages docs
Demo app will make 250 requests of https://api.github.com
and then exit.
in ./workshops/workshops/otel/monolith-workshop/node/
Install node.js OpenTelemetry Instrumentation:
setup-node.sh\n
Setup environment variables for OpenTelemetry:
setup-node-env.sh\n
Start demo app:
start-node.sh\n
"},{"location":"otel/monolith-workshop/node/#step-5-study-results-in-coralogix-portal","title":"Step 5 - Study results in Coralogix portal","text":"The shell scripts show how a monolith is set up and instrumented for OpenTelemetry.
"},{"location":"otel/monolith-workshop/python/","title":"OpenTelemetry for Node.js / Monolith","text":""},{"location":"otel/monolith-workshop/python/#instructions","title":"Instructions","text":"This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - Linux host (Debian preferred but RPM flavors will work) - Updated versions and sufficient permissions for installing software - Updated verson of node
and npm
installed https://nodejs.org/ - Proper IDE i.e. Visual Studio Code
Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/monolith-workshop/python/#step-2-change-to-workshop-dir","title":"Step 2 - Change to workshop dir","text":"Change to the proper directory for workshop example:
cd ./workshops/workshops/otel/monolith-workshop/python/\n
"},{"location":"otel/monolith-workshop/python/#step-3-set-up-otel-collector-on-a-linux-host","title":"Step 3 - Set up Otel Collector on a Linux host","text":"Download and install latest CONTRIB release version from here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases
Collector config.yaml
must be configured with Coralogix Exporter. See the \"Send Data to Coralogix\" section for determining telemetry endpoint and and API key: https://coralogix.com/docs/guide-first-steps-coralogix/
See the config.yaml
example in ./workshops/workshops/otel/monolith-workshop/node/otelcol
This file can be updated in /etc/otelcol/contrib/config.yaml
- make a backup of the default version first.
Manage the collector using systemctl
i.e. sudo systemctl restart otelcol
More info is here: https://coralogix.com/docs/guide-first-steps-coralogix/
You can check Collector status with these status URLS: http://localhost:55679/debug/tracez
http://localhost:55679/debug/pipelinez
For more info: zpages docs
python3 --version
to check you have python3 installed. If not follow the python3 installation document for your linux distribution. For ubuntu followpip3 --version
to check pip3 is installed. If not follow the pip3 installation documentation for your linux distribution. For ubuntu use command sudo apt-get install python3-pip
sudo apt upgrade
to upgrde already installed packages. If you receive a message to reboot your server do so before moving on to the next steps.This application make 100 requests to https://reqbin.com/echo/get/json
and then exit.
Run following scripts found under ./python:
source setup-python.sh\nsource setup-python-env.sh\nsource start-python.sh\n
Note: Running source setup-python.sh
would output long list of packages and with messages like Successfully installed opentelemetry-instrumentation-some-package.
Explore >> Logs UI Explore >> Tracing UI Individual Trace Setup Correlation (logs in-context) Logs In-context ```
"},{"location":"otel/monolith-workshop/windows/","title":"OpenTelemetry for .NET / Monolith","text":""},{"location":"otel/monolith-workshop/windows/#instructions","title":"Instructions","text":"This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - Windows Server 2019 or newer - Updated versions and sufficient permissions for downloading and installing software and no restrictions on GitHub domain - .NET Framework 3.5 or greater installed - PowerShell 5.1 or higher - Proper IDE i.e. Visual Studio Code
"},{"location":"otel/monolith-workshop/windows/#about-opentelemetry-for-net","title":"About OpenTelemetry For .NET","text":"You can find the complete instruction for .NET OpenTelemetry Agent Instrumentation is in .NET OpenTelemetry GitHub Repository.
There are three key steps to sending traces from a .NET application on Windows: - Install the OpenTelemetry collector - Install OpenTelemetry .NET instrumentation - Run a sample .NET application to test traces
"},{"location":"otel/monolith-workshop/windows/#step-1-setup","title":"Step 1 - Setup","text":"Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/monolith-workshop/windows/#step-2-otel-collector-installation","title":"Step 2 - OTEL Collector Installation","text":"Download and install latest CONTRIB release version from here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases
Use the following example from this repo a template for the OTEL collector config: /workshops/workshops/otel/monolith-workshop/dotnet-windows/otelcol/config.yaml
In config.yaml
adjust the domains and your Coralogix private key shown in the snippet below. Also define your application & subsystem name tags.
References: - Coralogix Endpoints - Coralogix Private Key - Application & Subsystem Names
#config.yaml\n\nexporters:\n logging:\n verbosity: detailed\n coralogix:\n # The Coralogix traces ingress endpoint\n traces:\n endpoint: \"YOURDOMAINHERE i.e. ingress.coralogix.us:443\"\n metrics:\n endpoint: \"YOURDOMAINHERE i.e. ingress.coralogix.us:443\"\n logs:\n endpoint: \"YOURDOMAINHERE i.e. ingress.coralogix.us:443\"\n\n # Your Coralogix private key is sensitive\n private_key: \"YOURKEYHERE\"\n\n...\n\n # Traces, Metrics and Logs emitted by this OpenTelemetry exporter \n # are tagged in Coralogix with the default application and subsystem constants.\n application_name: \"MyBusinessEnvironment\"\n subsystem_name: \"MyBusinessSystem\"\n
Next: run the collector using the command
otelcol-contrib.exe --config=config.yaml\n
"},{"location":"otel/monolith-workshop/windows/#step-3-install-net-instrumentation","title":"Step 3 - Install .NET Instrumentation","text":"You can find the complete instructions for .NET OpenTelemetry Agent Instrumentation is in .NET OpenTelemetry GitHub Repository.
Below is a shortcut set of instructions but these may be updated in the official documentation above, so we recommend following the officical set.
"},{"location":"otel/monolith-workshop/windows/#quick-start","title":"Quick start","text":"The official Otel instrumentation guide shows the following: Run the commands below in your PowerShell. Update the \"MyServiceDisplayName\"
with the name of your application.
# Download the module\n$module_url = \"https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest/download/OpenTelemetry.DotNet.Auto.psm1\"\n$download_path = Join-Path $env:temp \"OpenTelemetry.DotNet.Auto.psm1\"\nInvoke-WebRequest -Uri $module_url -OutFile $download_path -UseBasicParsing\n\n# Import the module to use its functions\nImport-Module $download_path\n\n# Install core files\nInstall-OpenTelemetryCore\n\n# Set up the instrumentation for the current PowerShell session\nRegister-OpenTelemetryForCurrentSession -OTelServiceName \"MyServiceDisplayName\"\n
Next, configure the follwing Environment Variables
$env:OTEL_RESOURCE_ATTRIBUTES='service.name=dotnetsvc,application.name=dotnetapp cx.application.name=dotnetappcx,cx.subsystem.name=dotnetsubcx'\n$env:OTEL_EXPORTER_OTLP_TRACES_ENDPOINT='localhost:4317'\n$env:OTEL_EXPORTER_OTLP_TRACES_PROTOCOL='grpc'\n
Finally, run your dotnet application with
dotnet run\n
"},{"location":"otel/monolith-workshop/windows/#step-4-example-application","title":"Step 4 - Example Application","text":"You can download & instrument the example application: ./workshops/workshops/otel/monolith-workshop/dotnet-windows/ExampleApp/
provided in this repository for testing.
The example sends traces of http get
requests of a public URL. Use dotnet run
to start the application.
You may want to open it first in Visual Studio 2022 or higher to ensure dependencies are installed first and then run from the Visual Studio 2022 console.
"},{"location":"otel/monolith-workshop/windows/#aspnet","title":"ASP.NET","text":"IIS / ASP.NET follows a different instruction path for instrumentation and is shown here: https://opentelemetry.io/docs/instrumentation/net/automatic/
"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Coralogix Workshops","text":"These workshops are designed to help learn and practice observability and practice integrations to the Coralogix platform. They include reference implementations that are easy to deploy and understand.
These workshops are not documentation- Coralogix platform documentation is located here
"},{"location":"#opentelemetry-info","title":"OpenTelemetry Info","text":"OpenTelemetry Overview and Value Proposition
"},{"location":"#workshops","title":"Workshops","text":""},{"location":"#apm-application-perfomance-measurement-reference-examples-and-training","title":"APM - Application Perfomance Measurement Reference Examples and Training","text":""},{"location":"#microservices","title":"Microservices","text":"Kubernetes (Python, Java) - Kubernetes OpenTelemetry Collector for metrics/traces/logs - OpenTelemetry tracing instrumentation for containerized Python and Java apps - Prometheus custom metrics collection - Sample \"bad\" deployment and errors
AWS ECS Fargate (Python) - 2x container microservice, OpenTelemetry Collector, Firelens log router - Complete Fargate task and ECS config instructions
"},{"location":"#monolith","title":"Monolith","text":"Monolith Otel Collector & Host based applications - Node.js / Linux - Python / Linux - .NET / Windows
"},{"location":"otel/about-opentelemetry/","title":"Overview and Value Proposition","text":""},{"location":"otel/about-opentelemetry/#opentelemetry","title":"OpenTelemetry","text":"OpenTelemetry is a standard organized by the Cloud Native Compute Foundation
The Cloud Native Compute Foundation publishes standards like Kubernetes and others that are the leading standards in the industry.
OpenTelemetry is comprised of two key elements: - A standard format for metrics, logs, and traces as well as standard protocols for shipping them - OpenTelemetry Software \u00a0\u00a0- OpenTelemetry Collector which can run anywhere (host/container/local) and receives, processes, and exports telemetry \u00a0\u00a0- OpenTelemetry Tracing Instrumentation for many languages that instruments your apps to emit traces and works in two ways \u00a0\u00a0\u00a0\u00a01. Automatic Instrumentation with no code changes and instruments a long list of frameworks for each language \u00a0\u00a0\u00a0\u00a02. Manual Instrumentation that is added to your code for fine grain trace span building
"},{"location":"otel/about-opentelemetry/#why-opentelemetry-because-observability-should-use-universal-standards","title":"Why OpenTelemetry? Because Observability Should Use Universal Standards","text":"Observability means measuring a system based on its outputs.
This is contrast to installing proprietary software for monitoring/remediation purposes- if a system can simply emit telemetry natively, software is no longer needed.
In a complex environment consisting of servers, containers, cloud, many application languages, and mixes and variations of all of the above, Observability is required to be able to proactively and/or in real time discover and repair problems however sytems are so diverse that traditional post-problem find/fix monitoring solutions no longer function or are scalable.
Monitoring systems traditionally required negotiation with vendors to supply \"monitoring software\" and \"agents\" that are threaded througout an environment. This means annual negotiations are required to keep a business online because technical debt of vendor relationships has to be cured on a regular basis. As systems grow larger and more distributed and complex, the private vendor lock on monitoring creates a fatal reliability flaw in the tech stack.
No one negotiates for HTTP, SQL, HTTPS, TCP etc every year- so why should anyone negotiative for observability formats and agents? These should be based open standards and included as part of day-to-day system building and operations.
OpenTelemetry formats and tracing instrumentation allow for devops, operations, and development to scale infinitely without worry of vendor lock-in or future risk to an environment due to proprietary software.
"},{"location":"otel/microservices-fargate/","title":"OpenTelemetry for AWS ECS Fargate - Microservice Example","text":""},{"location":"otel/microservices-fargate/#instructions","title":"Instructions","text":"This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - AWS Account - Intermediate to Advanced skill with ECS-Fargate - Sufficient permissions to configure AWS - Proper IDE i.e. Visual Studio Code
"},{"location":"otel/microservices-fargate/#step-1-setup","title":"Step 1 - Setup","text":"Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/microservices-fargate/#step-2-change-to-workshop-dir","title":"Step 2 - Change to workshop dir","text":"Change to the proper directory for workshop example:
cd ./workshops/workshops/otel/ecs-fargate\n
"},{"location":"otel/microservices-fargate/#step-3-prep-requirements","title":"Step 3: Prep Requirements","text":"1 - Put the following file in an S3 bucket: https://github.com/coralogix/telemetry-shippers/blob/master/logs/fluent-bit/ecs-fargate/base_filters.conf
2 - Put the following in a Systems Manager Parameter Store: https://github.com/coralogix/telemetry-shippers/blob/master/otel-ecs-fargate/config.yaml
3 - Create a role called ecsTaskExecutionRole
that contains the AWS managed AmazonECSTaskExecutionRolePolicy
and two example policies from this workshop: ecs-policy-s3-access.json
ecs-policy-secrets-access.json
These two policies should be tuned for your own production security needs when going into production.
"},{"location":"otel/microservices-fargate/#step-4-prep-register-task","title":"Step 4: Prep / Register Task","text":"Prep example Task: aws-fargate-otel-demo.json
Update all 14 locations replacing contents bewteen < >
and removing those brackets but leaving the quotes: adding task execution role, key, domain, S3 ARN, Systems Parameter etc...
Once prepped the task can be registered and made into a service.
"},{"location":"otel/microservices-fargate/#step-5-launch-task","title":"Step 5: Launch Task","text":"Launch according to your standard procedure.
The task creates the following containers: - two microservices (Client/Server) - FireLens log router - Otel collector
The microservice containers create a Python HTTP client and server that will generate spans and logs and send to Coralogix.
"},{"location":"otel/microservices-fargate/#step-6-study-results-in-coralogix-portal","title":"Step 6 - Study results in Coralogix portal","text":"The shell scripts show how a the microservices example.
"},{"location":"otel/microservices-workshop/","title":"OpenTelemetry Microservices / Kubernetes","text":""},{"location":"otel/microservices-workshop/#instructions","title":"Instructions","text":"This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - Kubernetes cluster that can be used as a sandbox environment - Updated versions and sufficient permissions for helm
and kubectl
- Proper IDE i.e. Visual Studio Code
See Appendix below for a suggested Kubernetes sandbox environment with a quick and easy setup
"},{"location":"otel/microservices-workshop/#step-1-install-the-opentelemetry-collector-on-your-k8s-cluster","title":"Step 1 - Install the OpenTelemetry Collector on your k8s cluster","text":"This workshop requires OpenTelemetry Collector configured for Coralogix: https://github.com/coralogix/telemetry-shippers/tree/master/otel-integration/k8s-helm/
Note that Coralogix makes several examples of the Collector helm charts available- the one above is the fully featured chart with Kube State Metrics
etc.
It requires a values.yaml
file as follows:
---\nglobal:\n domain: \"YourCoralogix.domain-i.e.-coralogix.us\"\n clusterName: \"YourClusterName\"\n
"},{"location":"otel/microservices-workshop/#step-2-setup","title":"Step 2 - Setup","text":"Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/microservices-workshop/#step-3-change-to-workshop-dir","title":"Step 3 - Change to workshop dir","text":"Change to the proper directory for workshop example:
cd workshops/workshops/otel/microservices-demo\n
"},{"location":"otel/microservices-workshop/#step-4-deploy-example","title":"Step 4 - Deploy example","text":"Deploy example to your k8s cluster- this will deploy to the default k8s namespace. If you want to change the namespace, edit yaml/deploy-good.yaml
There will be three services spun up:
cx-shopping-cart-reqs
- a requesting service initiating a transaction cx-payment-gateway-flask
- a server that is a bridge for a transaction to a database- returns a transaction ID to the shopping-cart
cx-redis
- an instance of a redis database used for a transactionsource deploy-all.sh\n
Deploys the following as seen from the http://cx-payment-gateway-flask:5000/
root span:
With healthy low latency spans for all services:
"},{"location":"otel/microservices-workshop/#step-5-study-results-and-simulate-cicd-scenarios","title":"Step 5 - Study results and simulate CI/CD scenarios","text":"
Study results in Coralogix portal
Simulate a \"bad\" deployment:
source deploy-reqs-bad.sh\n
This deployment will cause severe sporadic problems in payment-gateway
such as 404s, a log key:value 'transaction': 'failed',
and latency in the service response along with a drop in transaction volume. You can see the latency spikes here:
Alerts and automation can be built around span latency or Payment Gateway 404 responses.
Roll back the bad deployment for the services to return to normal:
source deploy-reqs-good.sh\n
Span latency will return to normal and Payment Gateway 404 responses will cease.
Study how the example is built: - The Python apps that drive this example are in the python/apps
dir - .yaml
deployment files are in python/yaml
- Dockerfiles for the containers show how the OpenTelemetry instrumentation works and are in the /python
root level
Deploy Java based Inventory service:
source deploy-java.sh\n
Prometheus metrics example:
source deploy-prometheus.sh\n
CustomGauge
with value 17 will now be available helm upgrade --reuse-values otel-coralogix-integration coralogix-charts-virtual/otel-integration --values ./yaml/override-prometheus.yaml \n
env:dev
to the CustomGauge
metric: helm upgrade --reuse-values otel-coralogix-integration coralogix-charts-virtual/otel-integration --values ./yaml/override-attr.yaml\n
CustomGauge
to clean up extra metrics- but leave the env:dev
label:helm upgrade --reuse-values otel-coralogix-integration coralogix-charts-virtual/otel-integration --values ./yaml/override-attr-drop.yaml\n
"},{"location":"otel/microservices-workshop/#step-6-cleanup","title":"Step 6 - Cleanup","text":"To remove all the deployments/services/pods from the example from your k8s cluster (ignore any errors it reports:
source delete-all.sh\n
"},{"location":"otel/microservices-workshop/#appendix-quick-kubernetes-sandbox-setup","title":"Appendix - Quick Kubernetes Sandbox Setup","text":"sudo chmod 644 /etc/rancher/k3s/k3s.yaml && export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
This script is included in the workshop in the k3s folder: source ./k3s/k3s.sh
This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - Linux host (Debian preferred but RPM flavors will work) - Updated versions and sufficient permissions for installing software - Updated verson of node
and npm
installed https://nodejs.org/ - Proper IDE i.e. Visual Studio Code
Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/monolith-workshop/node/#step-2-change-to-workshop-dir","title":"Step 2 - Change to workshop dir","text":"Change to the proper directory for workshop example:
cd ./workshops/workshops/otel/monolith-workshop/node/\n
"},{"location":"otel/monolith-workshop/node/#step-3-set-up-otel-collector-on-a-linux-host","title":"Step 3 - Set up Otel Collector on a Linux host","text":"Download and install latest CONTRIB release version from here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases
Collector config.yaml
must be configured with Coralogix Exporter. See the \"Send Data to Coralogix\" section for determining telemetry endpoint and and API key: https://coralogix.com/docs/guide-first-steps-coralogix/
See the config.yaml
example in ./workshops/workshops/otel/monolith-workshop/node/otelcol
This file can be updated in /etc/otelcol/contrib/config.yaml
- make a backup of the default version first.
Manage the collector using systemctl
i.e. sudo systemctl restart otelcol
More info is here: https://coralogix.com/docs/guide-first-steps-coralogix/
You can check Collector status with these status URLS: http://localhost:55679/debug/tracez
http://localhost:55679/debug/pipelinez
For more info: zpages docs
Demo app will make 250 requests of https://api.github.com
and then exit.
in ./workshops/workshops/otel/monolith-workshop/node/
Install node.js OpenTelemetry Instrumentation:
setup-node.sh\n
Setup environment variables for OpenTelemetry:
setup-node-env.sh\n
Start demo app:
start-node.sh\n
"},{"location":"otel/monolith-workshop/node/#step-5-study-results-in-coralogix-portal","title":"Step 5 - Study results in Coralogix portal","text":"The shell scripts show how a monolith is set up and instrumented for OpenTelemetry.
"},{"location":"otel/monolith-workshop/python/","title":"OpenTelemetry for Node.js / Monolith","text":""},{"location":"otel/monolith-workshop/python/#instructions","title":"Instructions","text":"This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - Linux host (Debian preferred but RPM flavors will work) - Updated versions and sufficient permissions for installing software - Updated verson of node
and npm
installed https://nodejs.org/ - Proper IDE i.e. Visual Studio Code
Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/monolith-workshop/python/#step-2-change-to-workshop-dir","title":"Step 2 - Change to workshop dir","text":"Change to the proper directory for workshop example:
cd ./workshops/workshops/otel/monolith-workshop/python/\n
"},{"location":"otel/monolith-workshop/python/#step-3-set-up-otel-collector-on-a-linux-host","title":"Step 3 - Set up Otel Collector on a Linux host","text":"Download and install latest CONTRIB release version from here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases
Collector config.yaml
must be configured with Coralogix Exporter. See the \"Send Data to Coralogix\" section for determining telemetry endpoint and and API key: https://coralogix.com/docs/guide-first-steps-coralogix/
See the config.yaml
example in ./workshops/workshops/otel/monolith-workshop/node/otelcol
This file can be updated in /etc/otelcol/contrib/config.yaml
- make a backup of the default version first.
Manage the collector using systemctl
i.e. sudo systemctl restart otelcol
More info is here: https://coralogix.com/docs/guide-first-steps-coralogix/
You can check Collector status with these status URLS: http://localhost:55679/debug/tracez
http://localhost:55679/debug/pipelinez
For more info: zpages docs
python3 --version
to check you have python3 installed. If not follow the python3 installation document for your linux distribution. For ubuntu followpip3 --version
to check pip3 is installed. If not follow the pip3 installation documentation for your linux distribution. For ubuntu use command sudo apt-get install python3-pip
sudo apt upgrade
to upgrde already installed packages. If you receive a message to reboot your server do so before moving on to the next steps.This application make 100 requests to https://reqbin.com/echo/get/json
and then exit.
Run following scripts found under ./python:
source setup-python.sh\nsource setup-python-env.sh\nsource start-python.sh\n
Note: Running source setup-python.sh
would output long list of packages and with messages like Successfully installed opentelemetry-instrumentation-some-package.
Explore >> Logs UI Explore >> Tracing UI Individual Trace Setup Correlation (logs in-context) Logs In-context ```
"},{"location":"otel/monolith-workshop/windows/","title":"OpenTelemetry for .NET / Monolith","text":""},{"location":"otel/monolith-workshop/windows/#instructions","title":"Instructions","text":"This example is for basic study only and is not documentation. Full documentation: https://coralogix.com/docs/ Requirements: - Windows Server 2019 or newer - Updated versions and sufficient permissions for downloading and installing software and no restrictions on GitHub domain - .NET Framework 3.5 or greater installed - PowerShell 5.1 or higher - Proper IDE i.e. Visual Studio Code
"},{"location":"otel/monolith-workshop/windows/#about-opentelemetry-for-net","title":"About OpenTelemetry For .NET","text":"You can find the complete instruction for .NET OpenTelemetry Agent Instrumentation is in .NET OpenTelemetry GitHub Repository.
There are three key steps to sending traces from a .NET application on Windows: - Install the OpenTelemetry collector - Install OpenTelemetry .NET instrumentation - Run a sample .NET application to test traces
"},{"location":"otel/monolith-workshop/windows/#step-1-setup","title":"Step 1 - Setup","text":"Clone repo:
git clone https://github.com/coralogix/workshops\n
"},{"location":"otel/monolith-workshop/windows/#step-2-otel-collector-installation","title":"Step 2 - OTEL Collector Installation","text":"Download and install latest CONTRIB release version from here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases
Use the following example from this repo a template for the OTEL collector config: /workshops/workshops/otel/monolith-workshop/dotnet-windows/otelcol/config.yaml
In config.yaml
adjust the domains and your Coralogix private key shown in the snippet below. Also define your application & subsystem name tags.
References: - Coralogix Endpoints - Coralogix Private Key - Application & Subsystem Names
#config.yaml\n\nexporters:\n logging:\n verbosity: detailed\n coralogix:\n # The Coralogix traces ingress endpoint\n traces:\n endpoint: \"YOURDOMAINHERE i.e. ingress.coralogix.us:443\"\n metrics:\n endpoint: \"YOURDOMAINHERE i.e. ingress.coralogix.us:443\"\n logs:\n endpoint: \"YOURDOMAINHERE i.e. ingress.coralogix.us:443\"\n\n # Your Coralogix private key is sensitive\n private_key: \"YOURKEYHERE\"\n\n...\n\n # Traces, Metrics and Logs emitted by this OpenTelemetry exporter \n # are tagged in Coralogix with the default application and subsystem constants.\n application_name: \"MyBusinessEnvironment\"\n subsystem_name: \"MyBusinessSystem\"\n
Next: run the collector using the command
otelcol-contrib.exe --config=config.yaml\n
"},{"location":"otel/monolith-workshop/windows/#step-3-install-net-instrumentation","title":"Step 3 - Install .NET Instrumentation","text":"You can find the complete instructions for .NET OpenTelemetry Agent Instrumentation is in .NET OpenTelemetry GitHub Repository.
Below is a shortcut set of instructions but these may be updated in the official documentation above, so we recommend following the officical set.
"},{"location":"otel/monolith-workshop/windows/#quick-start","title":"Quick start","text":"The official Otel instrumentation guide shows the following: Run the commands below in your PowerShell. Update the \"MyServiceDisplayName\"
with the name of your application.
# Download the module\n$module_url = \"https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest/download/OpenTelemetry.DotNet.Auto.psm1\"\n$download_path = Join-Path $env:temp \"OpenTelemetry.DotNet.Auto.psm1\"\nInvoke-WebRequest -Uri $module_url -OutFile $download_path -UseBasicParsing\n\n# Import the module to use its functions\nImport-Module $download_path\n\n# Install core files\nInstall-OpenTelemetryCore\n\n# Set up the instrumentation for the current PowerShell session\nRegister-OpenTelemetryForCurrentSession -OTelServiceName \"MyServiceDisplayName\"\n
Next, configure the follwing Environment Variables
$env:OTEL_RESOURCE_ATTRIBUTES='service.name=dotnetsvc,application.name=dotnetapp cx.application.name=dotnetappcx,cx.subsystem.name=dotnetsubcx'\n$env:OTEL_EXPORTER_OTLP_TRACES_ENDPOINT='localhost:4317'\n$env:OTEL_EXPORTER_OTLP_TRACES_PROTOCOL='grpc'\n
Finally, run your dotnet application with
dotnet run\n
"},{"location":"otel/monolith-workshop/windows/#step-4-example-application","title":"Step 4 - Example Application","text":"You can download & instrument the example application: ./workshops/workshops/otel/monolith-workshop/dotnet-windows/ExampleApp/
provided in this repository for testing.
The example sends traces of http get
requests of a public URL. Use dotnet run
to start the application.
You may want to open it first in Visual Studio 2022 or higher to ensure dependencies are installed first and then run from the Visual Studio 2022 console.
"},{"location":"otel/monolith-workshop/windows/#aspnet","title":"ASP.NET","text":"IIS / ASP.NET follows a different instruction path for instrumentation and is shown here: https://opentelemetry.io/docs/instrumentation/net/automatic/
"}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index a1133239..64c0e0f5 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ