> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ClickStack용 Deno SDK - ClickHouse Observability Stack

# Deno

export const ClickStackIntegrates = ({signals = []}) => {
  const list = Array.isArray(signals) ? signals : String(signals).split(",");
  const supported = list.map(s => String(s).trim().toLowerCase());
  const pillStyle = {
    display: "inline-flex",
    alignItems: "center",
    padding: "0.125rem 0.625rem",
    borderRadius: "9999px",
    fontSize: "0.8125rem",
    fontWeight: 500,
    lineHeight: 1.6,
    color: "#161517",
    backgroundColor: "#faff69",
    border: "1px solid rgba(0, 0, 0, .1)",
    marginRight: "0.5rem"
  };
  return <div style={{
    margin: "0 0 1.25rem"
  }}>
      <span style={{
    marginRight: "0.5rem"
  }}>이 가이드에서 통합하는 항목:</span>
      {supported.includes("logs") && <span style={pillStyle}>로그</span>}
      {supported.includes("metrics") && <span style={pillStyle}>메트릭</span>}
      {supported.includes("traces") && <span style={pillStyle}>트레이스</span>}
    </div>;
};

<ClickStackIntegrates signals={['logs']} />

<Note>
  현재 OpenTelemetry 로깅만 지원합니다. 트레이싱 지원은 [다음 가이드](https://dev.to/grunet/leveraging-opentelemetry-in-deno-45bj#a-minimal-interesting-example)를 참조하십시오.
</Note>

<h2 id="logging">
  로깅
</h2>

로깅은 `std/log` 모듈에 사용자 지정 로거를 export하여 지원됩니다.

**사용 예시:**

```typescript theme={null}
import * as log from 'https://deno.land/std@0.203.0/log/mod.ts';
import { OpenTelemetryHandler } from 'npm:@hyperdx/deno';

log.setup({
  handlers: {
    otel: new OpenTelemetryHandler('DEBUG'),
  },

  loggers: {
    'my-otel-logger': {
      level: 'DEBUG',
      handlers: ['otel'],
    },
  },
});

log.getLogger('my-otel-logger').info('Hello from Deno!');
```

<h3 id="run-the-application">
  애플리케이션 실행
</h3>

<Tabs>
  <Tab title="Managed ClickStack">
    ```shell theme={null}
    OTEL_EXPORTER_OTLP_ENDPOINT=<YOUR_OTEL_COLLECTOR_HTTP_ENDPOINT> \
    OTEL_SERVICE_NAME="<YOUR_SERVICE_NAME>" \
    deno run --allow-net --allow-env --allow-read --allow-sys --allow-run app.ts
    ```
  </Tab>

  <Tab title="ClickStack Open Source">
    ```shell theme={null}
    OTEL_EXPORTER_OTLP_HEADERS="authorization=<YOUR_INGESTION_API_KEY>" \
    OTEL_EXPORTER_OTLP_ENDPOINT=<YOUR_OTEL_COLLECTOR_HTTP_ENDPOINT> \
    OTEL_SERVICE_NAME="<YOUR_SERVICE_NAME>" \
    deno run --allow-net --allow-env --allow-read --allow-sys --allow-run app.ts
    ```
  </Tab>
</Tabs>
