diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/QuickStart/dotnet-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/QuickStart/dotnet-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..1619f2f229 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/QuickStart/dotnet-docker-quickStart-instrumentApplication.md @@ -0,0 +1,106 @@ + +### Step 1: Install OpenTelemetry Dependencies +Dependencies related to OpenTelemetry exporter and SDK have to be installed first. + +Run the below commands after navigating to the application source folder: +```bash +dotnet add package OpenTelemetry +dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol +dotnet add package OpenTelemetry.Extensions.Hosting +dotnet add package OpenTelemetry.Instrumentation.Runtime +dotnet add package OpenTelemetry.Instrumentation.AspNetCore +dotnet add package OpenTelemetry.AutoInstrumentation +``` + +  + +### Step 2: Adding OpenTelemetry as a service and configuring exporter options + +In your `Program.cs` file, add OpenTelemetry as a service. Here, we are configuring these variables: + +`serviceName` - It is the name of your service. + +`otlpOptions.Endpoint` - It is the endpoint for your OTel Collector agent. + +  + +Here’s a sample `Program.cs` file with the configured variables: + +```bash +using System.Diagnostics; +using OpenTelemetry.Exporter; +using OpenTelemetry.Resources; +using OpenTelemetry.Trace; + +var builder = WebApplication.CreateBuilder(args); + +// Configure OpenTelemetry with tracing and auto-start. +builder.Services.AddOpenTelemetry() + .ConfigureResource(resource => + resource.AddService(serviceName: "{{MYAPP}}")) + .WithTracing(tracing => tracing + .AddAspNetCoreInstrumentation() + .AddOtlpExporter(otlpOptions => + { + //sigNoz Cloud Endpoint + otlpOptions.Endpoint = new Uri("https://ingest.{{REGION}}.signoz.cloud:443"); + + otlpOptions.Protocol = OtlpExportProtocol.Grpc; + + //SigNoz Cloud account Ingestion key + string headerKey = "signoz-access-token"; + string headerValue = "{{SIGNOZ_INGESTION_KEY}}"; + + string formattedHeader = $"{headerKey}={headerValue}"; + otlpOptions.Headers = formattedHeader; + })); + +var app = builder.Build(); + +//The index route ("/") is set up to write out the OpenTelemetry trace information on the response: +app.MapGet("/", () => $"Hello World! OpenTelemetry Trace: {Activity.Current?.Id}"); + +app.Run(); +``` + +  + + +The OpenTelemetry.Exporter.Options get or set the target to which the exporter is going to send traces. Here, we’re configuring it to send traces to the OTel Collector agent. The target must be a valid Uri with the scheme (http or https) and host and may contain a port and a path. + +This is done by configuring an OpenTelemetry [TracerProvider](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/trace/customizing-the-sdk#readme) using extension methods and setting it to auto-start when the host is started. + + +### Step 3: Dockerize your application + +Since the crucial environment variables like SIGNOZ_INGESTION_KEY, Ingestion Endpoint and Service name are set in the `program.cs` file, you don't need to add any additional steps in your Dockerfile. + +An **example** of a Dockerfile could look like this: + +```bash + +# Use the Microsoft official .NET SDK image to build the application +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env +WORKDIR /app + +# Copy the CSPROJ file and restore any dependencies (via NUGET) +COPY *.csproj ./ +RUN dotnet restore + +# Copy the rest of the project files and build the application +COPY . ./ +RUN dotnet publish -c Release -o out + +# Generate the runtime image +FROM mcr.microsoft.com/dotnet/aspnet:8.0 +WORKDIR /app +COPY --from=build-env /app/out . + +# Expose port 5145 for the application +EXPOSE 5145 + +# Set the ASPNETCORE_URLS environment variable to listen on port 5145 +ENV ASPNETCORE_URLS=http://+:5145 + +ENTRYPOINT ["dotnet", "YOUR-APPLICATION.dll"] +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/QuickStart/dotnet-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/QuickStart/dotnet-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..38e5776db7 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/QuickStart/dotnet-docker-quickStart-runApplication.md @@ -0,0 +1,21 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..691bd7689c --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-instrumentApplication.md @@ -0,0 +1,101 @@ +After setting up the Otel collector agent, follow the steps below to instrument your .NET Application + +  +  + +### Step 1: Install OpenTelemetry Dependencies +Install the following dependencies in your application. + +```bash +dotnet add package OpenTelemetry +dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol +dotnet add package OpenTelemetry.Extensions.Hosting +dotnet add package OpenTelemetry.Instrumentation.Runtime +dotnet add package OpenTelemetry.Instrumentation.AspNetCore +dotnet add package OpenTelemetry.AutoInstrumentation +``` + +  + +### Step 2: Adding OpenTelemetry as a service and configuring exporter options + +In your `Program.cs` file, add OpenTelemetry as a service. Here, we are configuring these variables: + +`serviceName` - It is the name of your service. + +`otlpOptions.Endpoint` - It is the endpoint for your OTel Collector agent. + +  + +Here’s a sample `Program.cs` file with the configured variables: + +```bash +using System.Diagnostics; +using OpenTelemetry.Exporter; +using OpenTelemetry.Resources; +using OpenTelemetry.Trace; + +var builder = WebApplication.CreateBuilder(args); + +// Configure OpenTelemetry with tracing and auto-start. +builder.Services.AddOpenTelemetry() + .ConfigureResource(resource => + resource.AddService(serviceName: "{{MYAPP}}")) + .WithTracing(tracing => tracing + .AddAspNetCoreInstrumentation() + .AddOtlpExporter(otlpOptions => + { + otlpOptions.Endpoint = new Uri("http://localhost:4317"); + + otlpOptions.Protocol = OtlpExportProtocol.Grpc; + })); + +var app = builder.Build(); + +//The index route ("/") is set up to write out the OpenTelemetry trace information on the response: +app.MapGet("/", () => $"Hello World! OpenTelemetry Trace: {Activity.Current?.Id}"); + +app.Run(); +``` +  + +The OpenTelemetry.Exporter.Options get or set the target to which the exporter is going to send traces. Here, we’re configuring it to send traces to the OTel Collector agent. The target must be a valid Uri with the scheme (http or https) and host and may contain a port and a path. + +This is done by configuring an OpenTelemetry [TracerProvider](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/trace/customizing-the-sdk#readme) using extension methods and setting it to auto-start when the host is started. + + +  + +### Step 3: Dockerize your application + +Since the crucial environment variables like SIGNOZ_INGESTION_KEY, Ingestion Endpoint and Service name are set in the `program.cs` file, you don't need to add any additional steps in your Dockerfile. + +An **example** of a Dockerfile could look like this: + +```bash + +# Use the Microsoft official .NET SDK image to build the application +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env +WORKDIR /app + +# Copy the CSPROJ file and restore any dependencies (via NUGET) +COPY *.csproj ./ +RUN dotnet restore + +# Copy the rest of the project files and build the application +COPY . ./ +RUN dotnet publish -c Release -o out + +# Generate the runtime image +FROM mcr.microsoft.com/dotnet/aspnet:8.0 +WORKDIR /app +COPY --from=build-env /app/out . + +# Expose port 5145 for the application +EXPOSE 5145 + +# Set the ASPNETCORE_URLS environment variable to listen on port 5145 +ENV ASPNETCORE_URLS=http://+:5145 + +ENTRYPOINT ["dotnet", "YOUR-APPLICATION.dll"] +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-runApplication.md new file mode 100644 index 0000000000..38e5776db7 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Dotnet/md-docs/Docker/Recommended/dotnet-docker-recommended-runApplication.md @@ -0,0 +1,21 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/QuickStart/golang-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/QuickStart/golang-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..758cd13846 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/QuickStart/golang-docker-quickStart-instrumentApplication.md @@ -0,0 +1,135 @@ +### Step 1: Install OpenTelemetry Dependencies +Dependencies related to OpenTelemetry exporter and SDK have to be installed first. + +Run the below commands after navigating to the application source folder: +```bash +go get go.opentelemetry.io/otel \ + go.opentelemetry.io/otel/trace \ + go.opentelemetry.io/otel/sdk \ + go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin \ + go.opentelemetry.io/otel/exporters/otlp/otlptrace \ + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc +``` + +**Note:** We are assuming you are using gin request router. If you are using other request routers, check out the [corresponding package](https://signoz.io/docs/instrumentation/golang/#request-routers). +  +  + +### Step 2: Declare environment variables for configuring OpenTelemetry +Declare the following global variables in **`main.go`** which we will use to configure OpenTelemetry: +```bash + var ( + serviceName = os.Getenv("SERVICE_NAME") + collectorURL = os.Getenv("OTEL_EXPORTER_OTLP_ENDPOINT") + insecure = os.Getenv("INSECURE_MODE") + ) +``` +  + +### Step 3: Instrument your Go application +To configure your application to send data we will need a function to initialize OpenTelemetry. Add the following snippet of code in your **`main.go`** file. + +```bash + + import ( + ..... + + "google.golang.org/grpc/credentials" + "github.com/gin-gonic/gin" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" + + "go.opentelemetry.io/otel/sdk/resource" + sdktrace "go.opentelemetry.io/otel/sdk/trace" + ) + + func initTracer() func(context.Context) error { + + var secureOption otlptracegrpc.Option + + if strings.ToLower(insecure) == "false" || insecure == "0" || strings.ToLower(insecure) == "f" { + secureOption = otlptracegrpc.WithTLSCredentials(credentials.NewClientTLSFromCert(nil, "")) + } else { + secureOption = otlptracegrpc.WithInsecure() + } + + exporter, err := otlptrace.New( + context.Background(), + otlptracegrpc.NewClient( + secureOption, + otlptracegrpc.WithEndpoint(collectorURL), + ), + ) + + if err != nil { + log.Fatalf("Failed to create exporter: %v", err) + } + resources, err := resource.New( + context.Background(), + resource.WithAttributes( + attribute.String("service.name", serviceName), + attribute.String("library.language", "go"), + ), + ) + if err != nil { + log.Fatalf("Could not set resources: %v", err) + } + + otel.SetTracerProvider( + sdktrace.NewTracerProvider( + sdktrace.WithSampler(sdktrace.AlwaysSample()), + sdktrace.WithBatcher(exporter), + sdktrace.WithResource(resources), + ), + ) + return exporter.Shutdown + } +``` +  + +### Step 4: Initialise the tracer in **`main.go`** +Modify the main function to initialise the tracer in **`main.go`**. Initiate the tracer at the very beginning of our main function. +```bash +func main() { + cleanup := initTracer() + defer cleanup(context.Background()) + + ...... +} +``` +  + +### Step 5: Add the OpenTelemetry Gin middleware +Configure Gin to use the middleware by adding the following lines in **`main.go`** +```bash +import ( + .... + "go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin" +) + +func main() { + ...... + r := gin.Default() + r.Use(otelgin.Middleware(serviceName)) + ...... +} +``` + +  + +### Step 6: Dockerize your application + +Set the environment variables in your Dockerfile. + +```bash +... +# Set environment variables +ENV SERVICE_NAME={{MYAPP}} \ + INSECURE_MODE=false \ + OTEL_EXPORTER_OTLP_HEADERS="signoz-access-token=b{{SIGNOZ_INGESTION_KEY}}" \ + OTEL_EXPORTER_OTLP_ENDPOINT=ingest.{{REGION}}.signoz.cloud:443 +... +``` + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/QuickStart/golang-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/QuickStart/golang-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..38e5776db7 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/QuickStart/golang-docker-quickStart-runApplication.md @@ -0,0 +1,21 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..3598aa880b --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-instrumentApplication.md @@ -0,0 +1,137 @@ +After setting up the Otel collector agent, follow the steps below to instrument your Go Application +  +  + +### Step 1: Install OpenTelemetry Dependencies +Dependencies related to OpenTelemetry exporter and SDK have to be installed first. + +Run the below commands after navigating to the application source folder: +```bash +go get go.opentelemetry.io/otel \ + go.opentelemetry.io/otel/trace \ + go.opentelemetry.io/otel/sdk \ + go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin \ + go.opentelemetry.io/otel/exporters/otlp/otlptrace \ + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc +``` + +**Note:** We are assuming you are using gin request router. If you are using other request routers, check out the [corresponding package](https://signoz.io/docs/instrumentation/golang/#request-routers). +  +  + +### Step 2: Declare environment variables for configuring OpenTelemetry +Declare the following global variables in **`main.go`** which we will use to configure OpenTelemetry: +```bash + var ( + serviceName = os.Getenv("SERVICE_NAME") + collectorURL = os.Getenv("OTEL_EXPORTER_OTLP_ENDPOINT") + insecure = os.Getenv("INSECURE_MODE") + ) +``` +  + +### Step 3: Instrument your Go application +To configure your application to send data we will need a function to initialize OpenTelemetry. Add the following snippet of code in your **`main.go`** file. + +```bash + + import ( + ..... + + "google.golang.org/grpc/credentials" + "github.com/gin-gonic/gin" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" + + "go.opentelemetry.io/otel/sdk/resource" + sdktrace "go.opentelemetry.io/otel/sdk/trace" + ) + + func initTracer() func(context.Context) error { + + var secureOption otlptracegrpc.Option + + if strings.ToLower(insecure) == "false" || insecure == "0" || strings.ToLower(insecure) == "f" { + secureOption = otlptracegrpc.WithTLSCredentials(credentials.NewClientTLSFromCert(nil, "")) + } else { + secureOption = otlptracegrpc.WithInsecure() + } + + exporter, err := otlptrace.New( + context.Background(), + otlptracegrpc.NewClient( + secureOption, + otlptracegrpc.WithEndpoint(collectorURL), + ), + ) + + if err != nil { + log.Fatalf("Failed to create exporter: %v", err) + } + resources, err := resource.New( + context.Background(), + resource.WithAttributes( + attribute.String("service.name", serviceName), + attribute.String("library.language", "go"), + ), + ) + if err != nil { + log.Fatalf("Could not set resources: %v", err) + } + + otel.SetTracerProvider( + sdktrace.NewTracerProvider( + sdktrace.WithSampler(sdktrace.AlwaysSample()), + sdktrace.WithBatcher(exporter), + sdktrace.WithResource(resources), + ), + ) + return exporter.Shutdown + } +``` +  + +### Step 4: Initialise the tracer in **`main.go`** +Modify the main function to initialise the tracer in **`main.go`**. Initiate the tracer at the very beginning of our main function. +```bash +func main() { + cleanup := initTracer() + defer cleanup(context.Background()) + + ...... +} +``` +  + +### Step 5: Add the OpenTelemetry Gin middleware +Configure Gin to use the middleware by adding the following lines in **`main.go`** +```bash +import ( + .... + "go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin" +) + +func main() { + ...... + r := gin.Default() + r.Use(otelgin.Middleware(serviceName)) + ...... +} +``` + +  + +### Step 6: Dockerize your application + +Set the environment variables in your Dockerfile. + +```bash +... +# Set environment variables +ENV SERVICE_NAME={{MYAPP}} \ + INSECURE_MODE=true \ + OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317 +... +``` diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-runApplication.md new file mode 100644 index 0000000000..38e5776db7 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/Docker/Recommended/golang-docker-recommended-runApplication.md @@ -0,0 +1,21 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/LinuxAMD64/QuickStart/golang-linuxamd64-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/LinuxAMD64/QuickStart/golang-linuxamd64-quickStart-instrumentApplication.md index f265b09788..043b13d7e7 100644 --- a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/LinuxAMD64/QuickStart/golang-linuxamd64-quickStart-instrumentApplication.md +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/LinuxAMD64/QuickStart/golang-linuxamd64-quickStart-instrumentApplication.md @@ -1,7 +1,3 @@ -After setting up the Otel collector agent, follow the steps below to instrument your Go Application -  -  - ### Step 1: Install OpenTelemetry Dependencies Dependencies related to OpenTelemetry exporter and SDK have to be installed first. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/LinuxARM64/QuickStart/golang-linuxarm64-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/LinuxARM64/QuickStart/golang-linuxarm64-quickStart-instrumentApplication.md index f265b09788..043b13d7e7 100644 --- a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/LinuxARM64/QuickStart/golang-linuxarm64-quickStart-instrumentApplication.md +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/LinuxARM64/QuickStart/golang-linuxarm64-quickStart-instrumentApplication.md @@ -1,7 +1,3 @@ -After setting up the Otel collector agent, follow the steps below to instrument your Go Application -  -  - ### Step 1: Install OpenTelemetry Dependencies Dependencies related to OpenTelemetry exporter and SDK have to be installed first. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/MacOsAMD64/QuickStart/golang-macosamd64-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/MacOsAMD64/QuickStart/golang-macosamd64-quickStart-instrumentApplication.md index f265b09788..043b13d7e7 100644 --- a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/MacOsAMD64/QuickStart/golang-macosamd64-quickStart-instrumentApplication.md +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/MacOsAMD64/QuickStart/golang-macosamd64-quickStart-instrumentApplication.md @@ -1,7 +1,3 @@ -After setting up the Otel collector agent, follow the steps below to instrument your Go Application -  -  - ### Step 1: Install OpenTelemetry Dependencies Dependencies related to OpenTelemetry exporter and SDK have to be installed first. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/MacOsARM64/QuickStart/golang-macosarm64-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/MacOsARM64/QuickStart/golang-macosarm64-quickStart-instrumentApplication.md index f265b09788..043b13d7e7 100644 --- a/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/MacOsARM64/QuickStart/golang-macosarm64-quickStart-instrumentApplication.md +++ b/frontend/src/container/OnboardingContainer/Modules/APM/GoLang/md-docs/MacOsARM64/QuickStart/golang-macosarm64-quickStart-instrumentApplication.md @@ -1,7 +1,3 @@ -After setting up the Otel collector agent, follow the steps below to instrument your Go Application -  -  - ### Step 1: Install OpenTelemetry Dependencies Dependencies related to OpenTelemetry exporter and SDK have to be installed first. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/QuickStart/express-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/QuickStart/express-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..e376276e80 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/QuickStart/express-docker-quickStart-instrumentApplication.md @@ -0,0 +1,71 @@ + +#### Requirements +- Supported Versions ^4.0.0 +  + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/api@^1.6.0 +npm install --save @opentelemetry/sdk-node@^0.45.0 +npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4 +npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0 +``` +  + +### Step 2: Create tracing.js file + +```bash +// tracing.js +'use strict' +const process = require('process'); +const opentelemetry = require('@opentelemetry/sdk-node'); +const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); +const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http'); +const { Resource } = require('@opentelemetry/resources'); +const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); + +// do not set headers in exporterOptions, the OTel spec recommends setting headers through ENV variables +// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#specifying-headers-via-environment-variables + +const exporterOptions = { + url: 'https://ingest.{{REGION}}.signoz.cloud:443/v1/traces' +} + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' + }) +}); + +// initialize the SDK and register with the OpenTelemetry API +// this enables the API to record telemetry +sdk.start() + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk.shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); +``` + +  + +### Step 3: Dockerize your application + +Set the SigNoz ingestion key Environment variable and update your run command to include the `-r` flag and `./tracing.js` file in Dockerfile as: + +```bash +... +# Use an environment variable for the Signoz Ingestion Key +ENV OTEL_EXPORTER_OTLP_HEADERS="signoz-access-token={{SIGNOZ_INGESTION_KEY}}" + +# Run the app with the required OpenTelemetry configuration. app.js is your application main file. +CMD ["node", "-r", "./tracing.js", "app.js"] +... +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/QuickStart/express-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/QuickStart/express-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..da54fa79da --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/QuickStart/express-docker-quickStart-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/express/#troubleshooting-your-installation) for assistance. \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..69173b84f0 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-instrumentApplication.md @@ -0,0 +1,66 @@ +After setting up the Otel collector agent, follow the steps below to instrument your JavaScript Application + +#### Requirements +- Supported Versions ^4.0.0 +  + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/api@^1.6.0 +npm install --save @opentelemetry/sdk-node@^0.45.0 +npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4 +npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0 +``` +  + +### Step 2: Create tracing.js file + +```bash +// tracing.js +'use strict' +const process = require('process'); +const opentelemetry = require('@opentelemetry/sdk-node'); +const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); +const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http'); +const { Resource } = require('@opentelemetry/resources'); +const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); + +const exporterOptions = { + url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT || 'http://localhost:4318/v1/traces', +} + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' + }) +}); + +// initialize the SDK and register with the OpenTelemetry API +// this enables the API to record telemetry +sdk.start() + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk.shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); +``` + +  + +### Step 3: Dockerize your application + +Set the SigNoz ingestion key Environment variable and update your run command to include the `-r` flag and `./tracing.js` file in Dockerfile as: + +```bash +... +# Run the app with the required OpenTelemetry configuration. app.js is your application main file. +CMD ["node", "-r", "./tracing.js", "app.js"] +... +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-runApplication.md new file mode 100644 index 0000000000..da54fa79da --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Express/Docker/Recommended/express-docker-recommended-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/express/#troubleshooting-your-installation) for assistance. \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/QuickStart/nestjs-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/QuickStart/nestjs-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..420a0ed695 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/QuickStart/nestjs-docker-quickStart-instrumentApplication.md @@ -0,0 +1,103 @@ +#### Requirements +- Supported Versions >= `4.0.0` + +  + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/api@^1.6.0 +npm install --save @opentelemetry/sdk-node@^0.45.0 +npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4 +npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0 +``` +  + +### Step 2: Create tracing.js file + +```javascript +'use strict'; + +import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; +import { Resource } from '@opentelemetry/resources'; +import * as opentelemetry from '@opentelemetry/sdk-node'; +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; + +// Configure the SDK to export telemetry data to the console +// Enable all auto-instrumentations from the meta package +const exporterOptions = { + url: 'https://ingest.{{REGION}}.signoz.cloud:443/v1/traces', +}; + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}', + }), +}); + +// initialize the SDK and register with the OpenTelemetry API +// this enables the API to record telemetry +sdk.start(); + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk + .shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); + +export default sdk; +``` +  + +### Step 3: Import tracer in the `main.js file` + +**Important Note**: The below import should be the first line in the main file of your application (Ex -> `main.ts`) +```bash +const tracer = require('./tracer') +``` +  + +### Step 4: Start the tracer +In the `async function boostrap` section of the application code, initialize the tracer as follows: + +```javascript +const tracer = require('./tracer') + +import { NestFactory } from '@nestjs/core'; +import { AppModule } from './app.module'; + // All of your application code and any imports that should leverage + // OpenTelemetry automatic instrumentation must go here. + +async function bootstrap() { + await tracer.start(); + const app = await NestFactory.create(AppModule); + await app.listen(3001); + } + bootstrap(); +``` + +  + +### Step 5: Dockerize your application + +Set the SigNoz ingestion key Environment variable and expose port 3001 in Dockerfile as: + +```bash +... +# Use an environment variable for the Signoz Ingestion Key +ENV OTEL_EXPORTER_OTLP_HEADERS="signoz-access-token={{SIGNOZ_INGESTION_KEY}}" + +# In step 4 above, you are configuring your NestJS application to listen on port 3001 +EXPOSE 3001 + +# Run the app with the required OpenTelemetry configuration. +CMD [ "nest", "start" ] +... +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/QuickStart/nestjs-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/QuickStart/nestjs-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..aaef92765c --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/QuickStart/nestjs-docker-quickStart-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/nestjs/#troubleshooting-your-installation) for assistance. \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..058fd08373 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-instrumentApplication.md @@ -0,0 +1,104 @@ +  + +After setting up the Otel collector agent, follow the steps below to instrument your JavaScript Application + +#### Requirements +- Supported Versions >= `4.0.0` +  + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/api@^1.6.0 +npm install --save @opentelemetry/sdk-node@^0.45.0 +npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4 +npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0 +``` +  + +### Step 2: Create tracing.js file + +```bash +'use strict'; + +import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; +import { Resource } from '@opentelemetry/resources'; +import * as opentelemetry from '@opentelemetry/sdk-node'; +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; + +// Configure the SDK to export telemetry data to the console +// Enable all auto-instrumentations from the meta package +const exporterOptions = { + url: 'http://localhost:4318/v1/traces', +}; + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}', + }), +}); + +// initialize the SDK and register with the OpenTelemetry API +// this enables the API to record telemetry +sdk.start(); + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk + .shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); + +export default sdk; +``` +  + +### Step 3: Import tracer in the `main.js file` + +**Important Note**: The below import should be the first line in the main file of your application (Ex -> `main.ts`) +```bash +const tracer = require('./tracer') +``` +  + +### Step 4: Start the tracer +In the `async function boostrap` section of the application code, initialize the tracer as follows: + +```bash +const tracer = require('./tracer') + +import { NestFactory } from '@nestjs/core'; +import { AppModule } from './app.module'; + // All of your application code and any imports that should leverage + // OpenTelemetry automatic instrumentation must go here. + +async function bootstrap() { + await tracer.start(); + const app = await NestFactory.create(AppModule); + await app.listen(3001); + } + bootstrap(); +``` + +  + +### Step 5: Dockerize your application + +Expose port 3001 in Dockerfile as: + +```bash +... + +# In step 4 above, you are configuring your NestJS application to listen on port 3001 +EXPOSE 3001 + +# Run the app with the required OpenTelemetry configuration. +CMD [ "nest", "start" ] +... +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-runApplication.md new file mode 100644 index 0000000000..aaef92765c --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NestJS/Docker/Recommended/nestjs-docker-recommended-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/nestjs/#troubleshooting-your-installation) for assistance. \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/QuickStart/nodejs-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/QuickStart/nodejs-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..855988ebb1 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/QuickStart/nodejs-docker-quickStart-instrumentApplication.md @@ -0,0 +1,70 @@ + +#### Requirements +- NodeJS Version 14 or newer + +  + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/api@^1.6.0 +npm install --save @opentelemetry/sdk-node@^0.45.0 +npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4 +npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0 +``` +  + +### Step 2: Create tracing.js file + +```bash +// tracing.js +'use strict' +const process = require('process'); +const opentelemetry = require('@opentelemetry/sdk-node'); +const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); +const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http'); +const { Resource } = require('@opentelemetry/resources'); +const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); + +// do not set headers in exporterOptions, the OTel spec recommends setting headers through ENV variables +// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#specifying-headers-via-environment-variables + +const exporterOptions = { + url: 'https://ingest.{{REGION}}.signoz.cloud:443/v1/traces' +} + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' + }) +}); + +// initialize the SDK and register with the OpenTelemetry API +// this enables the API to record telemetry +sdk.start() + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk.shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); +``` + +### Step 3: Dockerize your application + +Set the SigNoz ingestion key Environment variable and update your run command to include the `-r` flag and `./tracing.js` file in Dockerfile as: + +```bash +... +# Use an environment variable for the Signoz Ingestion Key +ENV OTEL_EXPORTER_OTLP_HEADERS="signoz-access-token={{SIGNOZ_INGESTION_KEY}}" + +# Run the app with the required OpenTelemetry configuration. app.js is your application main file. +CMD ["node", "-r", "./tracing.js", "app.js"] +... +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/QuickStart/nodejs-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/QuickStart/nodejs-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..04b0ad7d49 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/QuickStart/nodejs-docker-quickStart-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/javascript/#troubleshooting-your-installation) for assistance. \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..90a6806c8c --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-instrumentApplication.md @@ -0,0 +1,67 @@ +  + +After setting up the Otel collector agent, follow the steps below to instrument your JavaScript Application + +#### Requirements +- NodeJS Version 14 or newer + +  + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/api@^1.6.0 +npm install --save @opentelemetry/sdk-node@^0.45.0 +npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4 +npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0 +``` +  + +### Step 2: Create tracing.js file + +```bash +// tracing.js +'use strict' +const process = require('process'); +const opentelemetry = require('@opentelemetry/sdk-node'); +const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); +const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http'); +const { Resource } = require('@opentelemetry/resources'); +const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); + +const exporterOptions = { + url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT || 'http://localhost:4318/v1/traces', +} + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' + }) +}); + +// initialize the SDK and register with the OpenTelemetry API +// this enables the API to record telemetry +sdk.start() + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk.shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); +``` + +### Step 3: Dockerize your application + +Set the SigNoz ingestion key Environment variable and update your run command to include the `-r` flag and `./tracing.js` file in Dockerfile as: + +```bash +... +# Run the app with the required OpenTelemetry configuration. app.js is your application main file. +CMD ["node", "-r", "./tracing.js", "app.js"] +... +``` diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-runApplication.md new file mode 100644 index 0000000000..04b0ad7d49 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/NodeJS/Docker/Recommended/nodejs-docker-recommended-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/javascript/#troubleshooting-your-installation) for assistance. \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/QuickStart/others-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/QuickStart/others-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..855988ebb1 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/QuickStart/others-docker-quickStart-instrumentApplication.md @@ -0,0 +1,70 @@ + +#### Requirements +- NodeJS Version 14 or newer + +  + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/api@^1.6.0 +npm install --save @opentelemetry/sdk-node@^0.45.0 +npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4 +npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0 +``` +  + +### Step 2: Create tracing.js file + +```bash +// tracing.js +'use strict' +const process = require('process'); +const opentelemetry = require('@opentelemetry/sdk-node'); +const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); +const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http'); +const { Resource } = require('@opentelemetry/resources'); +const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); + +// do not set headers in exporterOptions, the OTel spec recommends setting headers through ENV variables +// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#specifying-headers-via-environment-variables + +const exporterOptions = { + url: 'https://ingest.{{REGION}}.signoz.cloud:443/v1/traces' +} + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' + }) +}); + +// initialize the SDK and register with the OpenTelemetry API +// this enables the API to record telemetry +sdk.start() + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk.shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); +``` + +### Step 3: Dockerize your application + +Set the SigNoz ingestion key Environment variable and update your run command to include the `-r` flag and `./tracing.js` file in Dockerfile as: + +```bash +... +# Use an environment variable for the Signoz Ingestion Key +ENV OTEL_EXPORTER_OTLP_HEADERS="signoz-access-token={{SIGNOZ_INGESTION_KEY}}" + +# Run the app with the required OpenTelemetry configuration. app.js is your application main file. +CMD ["node", "-r", "./tracing.js", "app.js"] +... +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/QuickStart/others-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/QuickStart/others-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..04b0ad7d49 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/QuickStart/others-docker-quickStart-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/javascript/#troubleshooting-your-installation) for assistance. \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..90a6806c8c --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-instrumentApplication.md @@ -0,0 +1,67 @@ +  + +After setting up the Otel collector agent, follow the steps below to instrument your JavaScript Application + +#### Requirements +- NodeJS Version 14 or newer + +  + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/api@^1.6.0 +npm install --save @opentelemetry/sdk-node@^0.45.0 +npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4 +npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0 +``` +  + +### Step 2: Create tracing.js file + +```bash +// tracing.js +'use strict' +const process = require('process'); +const opentelemetry = require('@opentelemetry/sdk-node'); +const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node'); +const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http'); +const { Resource } = require('@opentelemetry/resources'); +const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); + +const exporterOptions = { + url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT || 'http://localhost:4318/v1/traces', +} + +const traceExporter = new OTLPTraceExporter(exporterOptions); +const sdk = new opentelemetry.NodeSDK({ + traceExporter, + instrumentations: [getNodeAutoInstrumentations()], + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' + }) +}); + +// initialize the SDK and register with the OpenTelemetry API +// this enables the API to record telemetry +sdk.start() + +// gracefully shut down the SDK on process exit +process.on('SIGTERM', () => { + sdk.shutdown() + .then(() => console.log('Tracing terminated')) + .catch((error) => console.log('Error terminating tracing', error)) + .finally(() => process.exit(0)); +}); +``` + +### Step 3: Dockerize your application + +Set the SigNoz ingestion key Environment variable and update your run command to include the `-r` flag and `./tracing.js` file in Dockerfile as: + +```bash +... +# Run the app with the required OpenTelemetry configuration. app.js is your application main file. +CMD ["node", "-r", "./tracing.js", "app.js"] +... +``` diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-runApplication.md new file mode 100644 index 0000000000..04b0ad7d49 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/Others/Docker/Recommended/others-docker-recommended-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/javascript/#troubleshooting-your-installation) for assistance. \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/QuickStart/reactjs-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/QuickStart/reactjs-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..bfcd21571b --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/QuickStart/reactjs-docker-quickStart-instrumentApplication.md @@ -0,0 +1,85 @@ + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/context-zone +npm install --save @opentelemetry/instrumentation +npm install --save @opentelemetry/auto-instrumentations-web +npm install --save @opentelemetry/sdk-trace-base +npm install --save @opentelemetry/sdk-trace-web +npm install --save @opentelemetry/resources +npm install --save @opentelemetry/semantic-conventions +npm install --save @opentelemetry/exporter-trace-otlp-http +``` +  + +### Step 2: Create tracing.js file + +```javascript +// tracing.js +import { ZoneContextManager } from '@opentelemetry/context-zone'; +import { registerInstrumentations } from '@opentelemetry/instrumentation'; +import { getWebAutoInstrumentations } from '@opentelemetry/auto-instrumentations-web'; +import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; +import { Resource } from '@opentelemetry/resources'; +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; + +const provider = new WebTracerProvider({ + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}', + }), +}); +const exporter = new OTLPTraceExporter({ + url: 'https://ingest.{{REGION}}.signoz.cloud:443/v1/traces', + headers: { + "signoz-access-token": "{{SIGNOZ_INGESTION_KEY}}", + }, +}); +provider.addSpanProcessor(new BatchSpanProcessor(exporter)); + +provider.register({ + // Changing default contextManager to use ZoneContextManager - supports asynchronous operations so that traces are not broken + contextManager: new ZoneContextManager(), +}); + +// Registering instrumentations +registerInstrumentations({ + instrumentations: [ + getWebAutoInstrumentations({ + + '@opentelemetry/instrumentation-xml-http-request': { + propagateTraceHeaderCorsUrls: [ + /.+/g, //Regex to match your backend urls. + ], + }, + '@opentelemetry/instrumentation-fetch': { + propagateTraceHeaderCorsUrls: [ + /.+/g, //Regex to match your backend urls. + ], + }, + }), + ], +}); +``` +### Step 3: Import tracer in main file + +**Important Note**: The below import should be the first line in the main file of your application (Ex -> `index.js`) +```bash +import './tracing.js' + +// ...rest of the app's entry point code +``` + +  + +### Step 4: Dockerize your application + +```bash +... + +# Run the app with the required OpenTelemetry configuration. +CMD [ "npm", "start" ] +... +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/QuickStart/reactjs-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/QuickStart/reactjs-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..0f7e5b4957 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/QuickStart/reactjs-docker-quickStart-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult this [documentation](https://signoz.io/docs/instrumentation/reactjs/) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..a737a1291f --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-instrumentApplication.md @@ -0,0 +1,79 @@ + +### Step 1: Install OpenTelemetry packages + +```bash +npm install --save @opentelemetry/context-zone +npm install --save @opentelemetry/instrumentation +npm install --save @opentelemetry/auto-instrumentations-web +npm install --save @opentelemetry/sdk-trace-base +npm install --save @opentelemetry/sdk-trace-web +npm install --save @opentelemetry/resources +npm install --save @opentelemetry/semantic-conventions +npm install --save @opentelemetry/exporter-trace-otlp-http +``` +  + +### Step 2: Create tracing.js file + +```javascript +// tracing.js +import { ZoneContextManager } from '@opentelemetry/context-zone'; +import { registerInstrumentations } from '@opentelemetry/instrumentation'; +import { getWebAutoInstrumentations } from '@opentelemetry/auto-instrumentations-web'; +import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base'; +import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; +import { Resource } from '@opentelemetry/resources'; +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; + +const provider = new WebTracerProvider({ + resource: new Resource({ + [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}', + }), +}); +const exporter = new OTLPTraceExporter({ + url: 'http://localhost:4318/v1/traces', +}); +provider.addSpanProcessor(new BatchSpanProcessor(exporter)); + +provider.register({ + // Changing default contextManager to use ZoneContextManager - supports asynchronous operations so that traces are not broken + contextManager: new ZoneContextManager(), +}); + +// Registering instrumentations +registerInstrumentations({ + instrumentations: [ + getWebAutoInstrumentations({ + + '@opentelemetry/instrumentation-xml-http-request': { + propagateTraceHeaderCorsUrls: [ + /.+/g, //Regex to match your backend urls. + ], + }, + '@opentelemetry/instrumentation-fetch': { + propagateTraceHeaderCorsUrls: [ + /.+/g, //Regex to match your backend urls. + ], + }, + }), + ], +}); +``` +### Step 3: Import tracer in main file + +**Important Note**: The below import should be the first line in the main file of your application (Ex -> `index.js`) +```bash +import './tracing.js' +// ...rest of the app's entry point code +``` + +### Step 4: Dockerize your application + +```bash +... + +# Run the app with the required OpenTelemetry configuration. +CMD [ "npm", "start" ] +... +``` \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-runApplication.md new file mode 100644 index 0000000000..0f7e5b4957 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Javascript/md-docs/ReactJS/Docker/Recommended/reactjs-docker-recommended-runApplication.md @@ -0,0 +1,28 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +```bash +docker run +``` + +  + +**Note** + + +If you encounter any difficulties, please consult this [documentation](https://signoz.io/docs/instrumentation/reactjs/) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/QuickStart/django-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/QuickStart/django-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..74d3f3fdc1 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/QuickStart/django-docker-quickStart-instrumentApplication.md @@ -0,0 +1,54 @@ +#### Requirements +- Python 3.8 or newer +- for Django, you must define `DJANGO_SETTINGS_MODULE` correctly. If your project is called `mysite`, something like following should work: +```bash +export DJANGO_SETTINGS_MODULE=mysite.settings +``` +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.{REGION}.signoz.cloud:443 +ENV OTEL_EXPORTER_OTLP_HEADERS=signoz-access-token={{SIGNOZ_INGESTION_KEY}} +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` or `python manage.py runserver --noreload` + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/QuickStart/django-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/QuickStart/django-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..b8fca02afb --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/QuickStart/django-docker-quickStart-runApplication.md @@ -0,0 +1,29 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +  + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/django/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..adc1d65400 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-instrumentApplication.md @@ -0,0 +1,59 @@ +  + +After setting up the Otel collector agent, follow the steps below to Dockerize your Python Application + +#### Requirements +- Python 3.8 or newer +- for Django, you must define `DJANGO_SETTINGS_MODULE` correctly. If your project is called `mysite`, something like following should work: +```bash +export DJANGO_SETTINGS_MODULE=mysite.settings +``` +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your Dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` or `python manage.py runserver --noreload` + + + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-runApplication.md new file mode 100644 index 0000000000..decd5061ae --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Django/Docker/Recommended/django-docker-recommended-runApplication.md @@ -0,0 +1,25 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/django/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/QuickStart/falcon-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/QuickStart/falcon-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..8677aef0f0 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/QuickStart/falcon-docker-quickStart-instrumentApplication.md @@ -0,0 +1,51 @@ +#### Requirements +- Python 3.8 or newer + +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.{REGION}.signoz.cloud:443 +ENV OTEL_EXPORTER_OTLP_HEADERS=signoz-access-token={{SIGNOZ_INGESTION_KEY}} +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/QuickStart/falcon-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/QuickStart/falcon-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..f72caf29b7 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/QuickStart/falcon-docker-quickStart-runApplication.md @@ -0,0 +1,29 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +  + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/falcon/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..644a539938 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-instrumentApplication.md @@ -0,0 +1,56 @@ +  + +After setting up the Otel collector agent, follow the steps below to Dockerize your Python Application + +#### Requirements +- Python 3.8 or newer + +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your Dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` + + + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-runApplication.md new file mode 100644 index 0000000000..b004b6b742 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Falcon/Docker/Recommended/falcon-docker-recommended-runApplication.md @@ -0,0 +1,25 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/falcon/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/QuickStart/fastapi-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/QuickStart/fastapi-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..e08f38ee49 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/QuickStart/fastapi-docker-quickStart-instrumentApplication.md @@ -0,0 +1,51 @@ +#### Requirements +- Python 3.8 or newer + +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.{REGION}.signoz.cloud:443 +ENV OTEL_EXPORTER_OTLP_HEADERS=signoz-access-token={{SIGNOZ_INGESTION_KEY}} +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` or `python manage.py runserver --noreload` + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/QuickStart/fastapi-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/QuickStart/fastapi-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..97ebbf19e4 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/QuickStart/fastapi-docker-quickStart-runApplication.md @@ -0,0 +1,29 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +  + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/fastapi/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..b0baec12f5 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-instrumentApplication.md @@ -0,0 +1,56 @@ +  + +After setting up the Otel collector agent, follow the steps below to Dockerize your Python Application + +#### Requirements +- Python 3.8 or newer + +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your Dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` or `python manage.py runserver --noreload` + + + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-runApplication.md new file mode 100644 index 0000000000..8d6a614868 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/FastAPI/Docker/Recommended/fastapi-docker-recommended-runApplication.md @@ -0,0 +1,25 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/fastapi/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/QuickStart/flask-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/QuickStart/flask-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..bae032d07d --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/QuickStart/flask-docker-quickStart-instrumentApplication.md @@ -0,0 +1,50 @@ +#### Requirements +- Python 3.8 or newer + +  + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +#(Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.{REGION}.signoz.cloud:443 +ENV OTEL_EXPORTER_OTLP_HEADERS=signoz-access-token={{SIGNOZ_INGESTION_KEY}} +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` or `flask run` + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/QuickStart/flask-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/QuickStart/flask-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..51f27ecaa9 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/QuickStart/flask-docker-quickStart-runApplication.md @@ -0,0 +1,29 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +  + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/flask/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..ce025d9152 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-instrumentApplication.md @@ -0,0 +1,56 @@ +  + +After setting up the Otel collector agent, follow the steps below to Dockerize your Python Application + +#### Requirements +- Python 3.8 or newer + +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your Dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` or `flask run` + + + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-runApplication.md new file mode 100644 index 0000000000..a392f07fc2 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Flask/Docker/Recommended/flask-docker-recommended-runApplication.md @@ -0,0 +1,25 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/flask/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/QuickStart/others-docker-quickStart-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/QuickStart/others-docker-quickStart-instrumentApplication.md new file mode 100644 index 0000000000..8677aef0f0 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/QuickStart/others-docker-quickStart-instrumentApplication.md @@ -0,0 +1,51 @@ +#### Requirements +- Python 3.8 or newer + +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.{REGION}.signoz.cloud:443 +ENV OTEL_EXPORTER_OTLP_HEADERS=signoz-access-token={{SIGNOZ_INGESTION_KEY}} +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/QuickStart/others-docker-quickStart-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/QuickStart/others-docker-quickStart-runApplication.md new file mode 100644 index 0000000000..53343fa324 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/QuickStart/others-docker-quickStart-runApplication.md @@ -0,0 +1,29 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +  + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +  + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/python/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-installOtelCollector.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-installOtelCollector.md new file mode 100644 index 0000000000..fbeda9c337 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-installOtelCollector.md @@ -0,0 +1,12 @@ +## Setup OpenTelemetry Binary as an agent + +  + +As a first step, you should install the OTel collector Binary according to the instructions provided on [this link](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/). + +  + +Once you are done setting up the OTel collector binary, you can follow the next steps. + +  + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-instrumentApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-instrumentApplication.md new file mode 100644 index 0000000000..644a539938 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-instrumentApplication.md @@ -0,0 +1,56 @@ +  + +After setting up the Otel collector agent, follow the steps below to Dockerize your Python Application + +#### Requirements +- Python 3.8 or newer + +  + + +### Step 1 : Add OpenTelemetry dependencies + +In your `requirements.txt` file, add these two OpenTelemetry dependencies: + + +```bash +opentelemetry-distro==0.43b0 +opentelemetry-exporter-otlp==1.22.0 + +``` + +  + +### Step 2 : Dockerize your application + +Update your Dockerfile along with OpenTelemetry instructions as shown below: + +```bash +... + +# Install any needed packages specified in requirements.txt +# And install OpenTelemetry packages +RUN pip install --no-cache-dir -r requirements.txt + +RUN opentelemetry-bootstrap --action=install + +# (Optional) Make port 5000 available to the world outside this container (You can choose your own port for this) +EXPOSE 5000 + +# Set environment variables for OpenTelemetry +ENV OTEL_RESOURCE_ATTRIBUTES=service.name={{MYAPP}} +ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 +ENV OTEL_EXPORTER_OTLP_PROTOCOL=grpc + +# Run app.py with OpenTelemetry instrumentation when the container launches +CMD ["opentelemetry-instrument", ""] +... +``` + +- can be `python3 app.py` + + + + + + diff --git a/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-runApplication.md b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-runApplication.md new file mode 100644 index 0000000000..da1e376789 --- /dev/null +++ b/frontend/src/container/OnboardingContainer/Modules/APM/Python/md-docs/Others/Docker/Recommended/others-docker-recommended-runApplication.md @@ -0,0 +1,25 @@ +Once you update your Dockerfile, you can build and run it using the commands below. + +### Step 1: Build your dockerfile + +Build your docker image + +```bash +docker build -t . +``` + +- `<` is the name of your Docker Image + +  + +### Step 2: Run your docker image + +The Docker run command starts a container in detached mode (-d) and maps port 5000 of the host to port 5000 of the container. + +```bash +docker run -d -p 5000:5000 +``` + +**Note** + +If you encounter any difficulties, please consult the [troubleshooting section](https://signoz.io/docs/instrumentation/python/#troubleshooting-your-installation) for assistance. diff --git a/frontend/src/container/OnboardingContainer/Steps/EnvironmentDetails/EnvironmentDetails.tsx b/frontend/src/container/OnboardingContainer/Steps/EnvironmentDetails/EnvironmentDetails.tsx index f4f8381de7..fd77b14fe2 100644 --- a/frontend/src/container/OnboardingContainer/Steps/EnvironmentDetails/EnvironmentDetails.tsx +++ b/frontend/src/container/OnboardingContainer/Steps/EnvironmentDetails/EnvironmentDetails.tsx @@ -30,6 +30,10 @@ const supportedEnvironments: SupportedEnvironmentsProps[] = [ name: 'MacOS ARM64', id: 'macOsARM64', }, + { + name: 'Docker', + id: 'docker', + }, ]; export default function EnvironmentDetails(): JSX.Element { @@ -55,6 +59,18 @@ export default function EnvironmentDetails(): JSX.Element { ) { return null; } + if ( + selectedModule?.id !== useCases.APM.id && + environment.id === 'docker' + ) { + return null; + } + if ( + selectedModule?.id !== useCases.APM.id && + environment.id === 'docker' + ) { + return null; + } return ( { const { hostname } = window.location; + return true; return hostname?.endsWith('signoz.cloud'); };