Skip to content

Commit 4f7f2d9

Browse files
committed
Fix whitespace
1 parent c871314 commit 4f7f2d9

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Add your [Logfire write token](https://logfire.pydantic.dev/docs/how-to-guides/c
3232
`wrangler.jsonc`:
3333

3434
```json
35-
"vars": {
36-
"LOGFIRE_TOKEN": "your-write-token",
37-
},
35+
"vars": {
36+
"LOGFIRE_TOKEN": "your-write-token",
37+
},
3838
```
3939

4040
`wrangler.toml`:
@@ -53,23 +53,23 @@ import { tracerConfig } from '@pydantic/logfire-cf-workers';
5353
import * as logfire from '@pydantic/logfire-api';
5454

5555
export interface Env {
56-
LOGFIRE_TOKEN: string;
57-
LOGFIRE_BASE_URL: string;
58-
OTEL_TEST: KVNamespace;
56+
LOGFIRE_TOKEN: string;
57+
LOGFIRE_BASE_URL: string;
58+
OTEL_TEST: KVNamespace;
5959
}
6060

6161
const handler = {
62-
async fetch(): Promise<Response> {
63-
logfire.info('Logfire: info from inside the worker body');
64-
return new Response('Hello World!');
65-
},
62+
async fetch(): Promise<Response> {
63+
logfire.info('Logfire: info from inside the worker body');
64+
return new Response('Hello World!');
65+
},
6666
} satisfies ExportedHandler<Env>;
6767

6868
const config: ResolveConfigFn = (env: Env, _trigger) => {
69-
return {
70-
service: { name: 'cloudflare-worker', namespace: '', version: '1.0.0' },
71-
...tracerConfig(env),
72-
};
69+
return {
70+
service: { name: 'cloudflare-worker', namespace: '', version: '1.0.0' },
71+
...tracerConfig(env),
72+
};
7373
};
7474

7575
export default instrument(handler, config);
@@ -154,9 +154,9 @@ logfire.configure()
154154
The `logfire.configure` call should happen before the actual express module imports, so your NPM start script should look something like this (`package.json`):
155155

156156
```json
157-
"scripts": {
158-
"start": "npx ts-node --require ./instrumentation.ts app.ts"
159-
},
157+
"scripts": {
158+
"start": "npx ts-node --require ./instrumentation.ts app.ts"
159+
},
160160
```
161161

162162
#### Configuring the instrumentation
@@ -180,7 +180,11 @@ The following methods create spans with the respective log levels (ordered by se
180180
Each method accepts a message, attributes, and, optionally options that let you specify the span tags. The attributes values must be serializable to JSON.
181181

182182
```ts
183-
function info(message: string, attributes?: Record<string, unknown>, options?: LogOptions): void
183+
function info(
184+
message: string,
185+
attributes?: Record<string, unknown>,
186+
options?: LogOptions
187+
): void
184188
```
185189

186190
## Contributing

0 commit comments

Comments
 (0)