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

> Deno SDK for ClickStack - The ClickHouse Observability Stack

# Deno

This guide Integrates the following:

* **Logs**

<Note>
  Currently only supports OpenTelemetry Logging. For tracing support, [see the following guide](https://dev.to/grunet/leveraging-opentelemetry-in-deno-45bj#a-minimal-interesting-example).
</Note>

<h2 id="logging">
  Logging
</h2>

Logging is supported by exporting a custom logger for the `std/log` module.

**Example usage:**

```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">
  Run the application
</h3>

<Tabs>
  <Tab title="Managed ClickStack">
    ```shell theme={null}
    OTEL_EXPORTER_OTLP_ENDPOINT=http://your-otel-collector:4318 \
    OTEL_SERVICE_NAME="<NAME_OF_YOUR_APP_OR_SERVICE>" \
    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=http://your-otel-collector:4318 \
    OTEL_SERVICE_NAME="<NAME_OF_YOUR_APP_OR_SERVICE>" \
    deno run --allow-net --allow-env --allow-read --allow-sys --allow-run app.ts
    ```
  </Tab>
</Tabs>
