docs: added ror onboarding docs (#3927)

* docs: added ror onboarding docs

* feat: add ror docs

* feat: update ror details in connection status

---------

Co-authored-by: Yunus A M <myounis.ar@live.com>
Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
This commit is contained in:
CheetoDa 2023-11-10 13:09:25 +05:30 committed by GitHub
parent 30b0d42604
commit 6b2f857a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 395 additions and 118 deletions

View File

@ -12,6 +12,7 @@ import GoLang from './GoLang/GoLang';
import Java from './Java/Java'; import Java from './Java/Java';
import Javascript from './Javascript/Javascript'; import Javascript from './Javascript/Javascript';
import Python from './Python/Python'; import Python from './Python/Python';
import RoR from './RubyOnRails/ROR';
interface IngestionInfoProps { interface IngestionInfoProps {
SIGNOZ_INGESTION_KEY?: string; SIGNOZ_INGESTION_KEY?: string;
@ -39,6 +40,10 @@ const supportedLanguages = [
name: 'go', name: 'go',
imgURL: `Logos/java.png`, imgURL: `Logos/java.png`,
}, },
{
name: 'rails',
imgURL: `Logos/rails.png`,
},
]; ];
export default function APM({ export default function APM({
@ -91,6 +96,8 @@ export default function APM({
return <Javascript ingestionInfo={ingestionInfo} activeStep={activeStep} />; return <Javascript ingestionInfo={ingestionInfo} activeStep={activeStep} />;
case 'go': case 'go':
return <GoLang ingestionInfo={ingestionInfo} activeStep={activeStep} />; return <GoLang ingestionInfo={ingestionInfo} activeStep={activeStep} />;
case 'rails':
return <RoR ingestionInfo={ingestionInfo} activeStep={activeStep} />;
default: default:
return <> </>; return <> </>;
} }

View File

@ -20,10 +20,10 @@ From VMs, there are two ways to send data to SigNoz Cloud.
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```bash ```bash
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create tracing.js file Step 2. Create tracing.js file
@ -87,10 +87,10 @@ You can find instructions to install OTel Collector binary [here](https://signoz
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```js ```js
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create tracing.js file Step 2. Create tracing.js file
@ -148,10 +148,10 @@ Once you have set up OTel Collector agent, you can proceed with OpenTelemetry Ja
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```bash ```bash
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create tracing.js file Step 2. Create tracing.js file

View File

@ -18,10 +18,10 @@ From VMs, there are two ways to send data to SigNoz Cloud.
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```bash ```bash
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create tracing.js file Step 2. Create tracing.js file
@ -86,10 +86,10 @@ You can find instructions to install OTel Collector binary [here](https://signoz
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```js ```js
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create tracing.js file Step 2. Create tracing.js file
@ -149,10 +149,10 @@ Once you have set up OTel Collector agent, you can proceed with OpenTelemetry Ja
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```js ```js
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create tracing.js file Step 2. Create tracing.js file

View File

@ -20,10 +20,10 @@ From VMs, there are two ways to send data to SigNoz Cloud.
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```bash ```bash
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create `tracer.ts` file Step 2. Create `tracer.ts` file
@ -31,40 +31,43 @@ Step 2. Create `tracer.ts` file
This file will have your SigNoz cloud endpoint and service name configued as values of `url` and `SERVICE_NAME` respectively. This file will have your SigNoz cloud endpoint and service name configued as values of `url` and `SERVICE_NAME` respectively.
```js ```js
'use strict' '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');
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 = { const exporterOptions = {
url: 'https://ingest.{{REGION}}.signoz.cloud:443/v1/traces' url: 'https://ingest.{{REGION}}.signoz.cloud:443/v1/traces',
} };
const traceExporter = new OTLPTraceExporter(exporterOptions); const traceExporter = new OTLPTraceExporter(exporterOptions);
const sdk = new opentelemetry.NodeSDK({ const sdk = new opentelemetry.NodeSDK({
traceExporter, traceExporter,
instrumentations: [getNodeAutoInstrumentations()], instrumentations: [getNodeAutoInstrumentations()],
resource: new Resource({ resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}',
}) }),
}); });
// initialize the SDK and register with the OpenTelemetry API // initialize the SDK and register with the OpenTelemetry API
// this enables the API to record telemetry // this enables the API to record telemetry
sdk.start() sdk.start();
// gracefully shut down the SDK on process exit // gracefully shut down the SDK on process exit
process.on('SIGTERM', () => { process.on('SIGTERM', () => {
sdk.shutdown() sdk
.shutdown()
.then(() => console.log('Tracing terminated')) .then(() => console.log('Tracing terminated'))
.catch((error) => console.log('Error terminating tracing', error)) .catch((error) => console.log('Error terminating tracing', error))
.finally(() => process.exit(0)); .finally(() => process.exit(0));
}); });
module.exports = sdk export default sdk;
``` ```
Step 3. Import the tracer module where your app starts `(Ex —> main.ts)` Step 3. Import the tracer module where your app starts `(Ex —> main.ts)`
@ -112,10 +115,10 @@ You can find instructions to install OTel Collector binary [here](https://signoz
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```js ```js
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create `tracer.ts` file Step 2. Create `tracer.ts` file
@ -123,41 +126,43 @@ Step 2. Create `tracer.ts` file
This file will have your service name configued as value for `SERVICE_NAME`. This file will have your service name configued as value for `SERVICE_NAME`.
```js ```js
'use strict' 'use strict';
const process = require('process');
//OpenTelemetry
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');
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 = { const exporterOptions = {
url: 'http://localhost:4318/v1/traces' url: 'http://localhost:4318/v1/traces',
} };
const traceExporter = new OTLPTraceExporter(exporterOptions); const traceExporter = new OTLPTraceExporter(exporterOptions);
const sdk = new opentelemetry.NodeSDK({ const sdk = new opentelemetry.NodeSDK({
traceExporter, traceExporter,
instrumentations: [getNodeAutoInstrumentations()], instrumentations: [getNodeAutoInstrumentations()],
resource: new Resource({ resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}',
}) }),
}); });
// initialize the SDK and register with the OpenTelemetry API // initialize the SDK and register with the OpenTelemetry API
// this enables the API to record telemetry // this enables the API to record telemetry
sdk.start() sdk.start();
// gracefully shut down the SDK on process exit // gracefully shut down the SDK on process exit
process.on('SIGTERM', () => { process.on('SIGTERM', () => {
sdk.shutdown() sdk
.shutdown()
.then(() => console.log('Tracing terminated')) .then(() => console.log('Tracing terminated'))
.catch((error) => console.log('Error terminating tracing', error)) .catch((error) => console.log('Error terminating tracing', error))
.finally(() => process.exit(0)); .finally(() => process.exit(0));
}); });
module.exports = sdk export default sdk;
``` ```
Step 3. Import the tracer module where your app starts Step 3. Import the tracer module where your app starts
@ -200,10 +205,10 @@ Once you have set up OTel Collector agent, you can proceed with OpenTelemetry Ja
Step 1. Install OpenTelemetry packages Step 1. Install OpenTelemetry packages
```bash ```bash
npm install --save @opentelemetry/api@^1.4.1 npm install --save @opentelemetry/api@^1.6.0
npm install --save @opentelemetry/sdk-node@^0.39.1 npm install --save @opentelemetry/sdk-node@^0.45.0
npm install --save @opentelemetry/auto-instrumentations-node@^0.37.0 npm install --save @opentelemetry/auto-instrumentations-node@^0.39.4
npm install --save @opentelemetry/exporter-trace-otlp-http@^0.39.1 npm install --save @opentelemetry/exporter-trace-otlp-http@^0.45.0
``` ```
Step 2. Create `tracer.ts` file Step 2. Create `tracer.ts` file
@ -211,41 +216,43 @@ Step 2. Create `tracer.ts` file
This file will have your service name configued as value for `SERVICE_NAME`. This file will have your service name configued as value for `SERVICE_NAME`.
```js ```js
'use strict' 'use strict';
const process = require('process');
//OpenTelemetry
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');
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 = { const exporterOptions = {
url: 'http://localhost:4318/v1/traces' url: 'http://localhost:4318/v1/traces',
} };
const traceExporter = new OTLPTraceExporter(exporterOptions); const traceExporter = new OTLPTraceExporter(exporterOptions);
const sdk = new opentelemetry.NodeSDK({ const sdk = new opentelemetry.NodeSDK({
traceExporter, traceExporter,
instrumentations: [getNodeAutoInstrumentations()], instrumentations: [getNodeAutoInstrumentations()],
resource: new Resource({ resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}' [SemanticResourceAttributes.SERVICE_NAME]: '{{MYAPP}}',
}) }),
}); });
// initialize the SDK and register with the OpenTelemetry API // initialize the SDK and register with the OpenTelemetry API
// this enables the API to record telemetry // this enables the API to record telemetry
sdk.start() sdk.start();
// gracefully shut down the SDK on process exit // gracefully shut down the SDK on process exit
process.on('SIGTERM', () => { process.on('SIGTERM', () => {
sdk.shutdown() sdk
.shutdown()
.then(() => console.log('Tracing terminated')) .then(() => console.log('Tracing terminated'))
.catch((error) => console.log('Error terminating tracing', error)) .catch((error) => console.log('Error terminating tracing', error))
.finally(() => process.exit(0)); .finally(() => process.exit(0));
}); });
module.exports = sdk export default sdk;
``` ```
Step 3. Import the tracer module where your app starts Step 3. Import the tracer module where your app starts

View File

@ -0,0 +1,68 @@
import './ROR.styles.scss';
import { Form, Input } from 'antd';
import { MarkdownRenderer } from 'components/MarkdownRenderer/MarkdownRenderer';
import Header from 'container/OnboardingContainer/common/Header/Header';
import { LangProps } from '../APM';
import ConnectionStatus from '../common/ConnectionStatus/ConnectionStatus';
import RORDocs from './RubyOnRails.md';
export default function RoR({
ingestionInfo,
activeStep,
}: LangProps): JSX.Element {
const [form] = Form.useForm();
const serviceName = Form.useWatch('Service Name', form);
const variables = {
MYAPP: serviceName || '<service-name>',
SIGNOZ_INGESTION_KEY:
ingestionInfo.SIGNOZ_INGESTION_KEY || '<SIGNOZ_INGESTION_KEY>',
REGION: ingestionInfo.REGION || 'region',
};
return (
<>
{activeStep === 2 && (
<div className="ror-setup-instructions-container">
<Header
entity="rails"
heading="Ruby on Rails OpenTelemetry Instrumentation"
imgURL="/Logos/rails.png"
docsURL="https://signoz.io/docs/instrumentation/ruby-on-rails/"
imgClassName="supported-language-img"
/>
<div className="form-container">
<div className="service-name-container">
<div className="label"> Service Name </div>
<Form form={form} name="service-name" style={{ minWidth: '300px' }}>
<Form.Item
hasFeedback
name="Service Name"
rules={[{ required: true }]}
validateTrigger="onBlur"
>
<Input autoFocus />
</Form.Item>
</Form>
</div>
</div>
<div className="content-container">
<MarkdownRenderer markdownContent={RORDocs} variables={variables} />
</div>
</div>
)}
{activeStep === 3 && (
<ConnectionStatus
serviceName={form.getFieldValue('Service Name')}
framework="rails"
language="rails"
/>
)}
</>
);
}

View File

@ -0,0 +1,178 @@
## Send Traces to SigNoz Cloud
### Application on VMs
From VMs, there are two ways to send data to SigNoz Cloud.
- Send traces directly to SigNoz Cloud (quick start)
- Send traces via OTel Collector binary (recommended)
#### **Send traces directly to SigNoz Cloud**
**Step 1. Install dependencies**
Install dependencies related to OpenTelemetry SDK and exporter using gem.
```go
gem install opentelemetry-sdk
gem install opentelemetry-exporter-otlp
gem install opentelemetry-instrumentation-all
```
Include the required packages into your gemfile.
```go
gem 'opentelemetry-sdk'
gem 'opentelemetry-exporter-otlp'
gem 'opentelemetry-instrumentation-all'
```
Run the bundle install command:
```go
bundle install
```
**Step 2. Initialize the OpenTelemetry SDK**
Initialize the otel sdk by adding below lines to `config/environment.rb` of your Ruby on Rails application.
```jsx
require 'opentelemetry/sdk'
require_relative 'application'
OpenTelemetry::SDK.configure do |c|
c.use_all
end
Rails.application.initialize!
```
**Step 3. Running your Ruby application**
Run the application using the below:
```jsx
OTEL_EXPORTER=otlp \
OTEL_SERVICE_NAME={{MYAPP}} \
OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.{{REGION}}.signoz.cloud:443 \
OTEL_EXPORTER_OTLP_HEADERS=signoz-access-token={{SIGNOZ_INGESTION_KEY}} \
rails server
```
---
#### **Send traces via OTel Collector binary**
OTel Collector binary helps to collect logs, hostmetrics, resource and infra attributes. It is recommended to install Otel Collector binary to collect and send traces to SigNoz cloud. You can correlate signals and have rich contextual data through this way.
You can find instructions to install OTel Collector binary [here](https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/) in your VM. Once you are done setting up your OTel Collector binary, you can follow the below steps for instrumenting your Ruby on Rails application.
**Step 1. Install dependencies**
Install dependencies related to OpenTelemetry SDK and exporter using gem.
```go
gem install opentelemetry-sdk
gem install opentelemetry-exporter-otlp
gem install opentelemetry-instrumentation-all
```
Include the required packages into your gemfile.
```go
gem 'opentelemetry-sdk'
gem 'opentelemetry-exporter-otlp'
gem 'opentelemetry-instrumentation-all'
```
Run the bundle install command:
```go
bundle install
```
**Step 2. Initialize the OpenTelemetry SDK**
Initialize the otel sdk by adding below lines to `config/environment.rb` of your Ruby on Rails application.
```jsx
require 'opentelemetry/sdk'
require_relative 'application'
OpenTelemetry::SDK.configure do |c|
c.use_all
end
Rails.application.initialize!
```
**Step 3. Running your Ruby application**
Run the application using the below:
```jsx
OTEL_EXPORTER=otlp \
OTEL_SERVICE_NAME={{MYAPP}} \
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 \
rails server
```
In case you have OtelCollector Agent in different VM, replace localhost:4318 with `<IP Address of the VM>:4318`.
---
### Applications Deployed on Kubernetes
For Ruby on Rails application deployed on Kubernetes, you need to install OTel Collector agent in your k8s infra to collect and send traces to SigNoz Cloud. You can find the instructions to install OTel Collector agent [here](https://signoz.io/docs/tutorial/kubernetes-infra-metrics/).
**Step 1. Install dependencies**
Install dependencies related to OpenTelemetry SDK and exporter using gem.
```go
gem install opentelemetry-sdk
gem install opentelemetry-exporter-otlp
gem install opentelemetry-instrumentation-all
```
Include the required packages into your gemfile.
```go
gem 'opentelemetry-sdk'
gem 'opentelemetry-exporter-otlp'
gem 'opentelemetry-instrumentation-all'
```
Run the bundle install command:
```go
bundle install
```
**Step 2. Initialize the OpenTelemetry SDK**
Initialize the otel sdk by adding below lines to `config/environment.rb` of your Ruby on Rails application.
```jsx
require 'opentelemetry/sdk'
require_relative 'application'
OpenTelemetry::SDK.configure do |c|
c.use_all
end
Rails.application.initialize!
```
**Step 3. Running your Ruby application**
Run the application using the below:
```jsx
OTEL_EXPORTER=otlp \
OTEL_SERVICE_NAME={{MYAPP}} \
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 \
rails server
```

View File

@ -24,7 +24,7 @@ interface ConnectionStatusProps {
framework: string; framework: string;
} }
const pollingInterval = 15000; const pollingInterval = 10000;
export default function ConnectionStatus({ export default function ConnectionStatus({
serviceName, serviceName,
@ -103,6 +103,16 @@ export default function ConnectionStatus({
imgClassName="supported-language-img" imgClassName="supported-language-img"
/> />
); );
case 'rails':
return (
<Header
entity="rails"
heading="Ruby on Rails OpenTelemetry Instrumentation"
imgURL="/Logos/rails.png"
docsURL="https://signoz.io/docs/instrumentation/ruby-on-rails/"
imgClassName="supported-language-img"
/>
);
default: default:
return <> </>; return <> </>;

View File

@ -1,23 +1,30 @@
## Collect Docker Container Logs in SigNoz Cloud ## Collect Docker Container Logs in SigNoz Cloud
- Clone this [repository](https://github.com/SigNoz/docker-container-logs) **Step 1. Clone this repository**
- Update `otel-collector-config.yaml` and set the values of `<SIGNOZ_INGESTION_KEY>` and `{region}`. Clone the GitHub repository as a first step to collect logs
Depending on the choice of your region for SigNoz cloud, the ingest endpoint will vary accordingly. ```bash
git clone https://github.com/SigNoz/docker-container-logs.git
```
US - ingest.us.signoz.cloud:443 **Step 2. Update your `.env` file**
IN - ingest.in.signoz.cloud:443 In the repository that you cloned above, update `.env` file by putting the values of `<SIGNOZ_INGESTION_KEY>` and `{region}`.
EU - ingest.eu.signoz.cloud:443 Depending on the choice of your region for SigNoz cloud, the ingest endpoint will vary accordingly.
US - ingest.us.signoz.cloud:443
- Start the containers IN - ingest.in.signoz.cloud:443
EU - ingest.eu.signoz.cloud:443
**Step 3. Start the containers**
```bash ```bash
docker compose up -d docker compose up -d
``` ```
- If there are no errors your logs will be exported and will be visible on the SigNoz UI. If there are no errors your logs will be exported and will be visible on the SigNoz UI.