Skip to content

Commit a4effe4

Browse files
committed
[node-tracing] Remove dead serverId/serverToken config
1 parent a57ab29 commit a4effe4

5 files changed

Lines changed: 4 additions & 15 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Blackfire.start({
4545
// Blackfire.stop();
4646
```
4747

48+
Authentication is handled by the Blackfire Agent, not the probe: the agent forwards profiles to the backend using its own credentials (`BLACKFIRE_SERVER_ID` / `BLACKFIRE_SERVER_TOKEN` configured on the agent). The probe only needs to reach the agent socket.
49+
4850
## Example
4951

5052
1. Install dependencies

src/index.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ export interface BlackfireConfiguration {
33
appName?: string;
44
/** Socket to the Blackfire agent. Defaults to platform-specific socket. */
55
agentSocket?: string;
6-
/** Blackfire Server ID (should be defined with serverToken). */
7-
serverId?: string;
8-
/** Blackfire Server Token (should be defined with serverId). */
9-
serverToken?: string;
106
/** Labels to add to the profile. */
117
labels?: Record<string, string>;
128
/** Timeout in milliseconds for the upload request. Defaults to 10000. */
@@ -18,5 +14,4 @@ export function stop(): boolean;
1814

1915
export const defaultConfig: Required<
2016
Pick<BlackfireConfiguration, 'appName' | 'agentSocket' | 'uploadTimeoutMillis' | 'labels'>
21-
> &
22-
Pick<BlackfireConfiguration, 'serverId' | 'serverToken'>;
17+
>;

src/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ const defaultConfig = {
7171
appName: 'my-node-app',
7272
/** socket to the Blackfire agent. */
7373
agentSocket: process.env.BLACKFIRE_AGENT_SOCKET || defaultAgentSocket(),
74-
/** Blackfire Server ID (should be defined with serverToken). */
75-
serverId: undefined,
76-
/** Blackfire Server Token (should be defined with serverId). */
77-
serverToken: undefined,
7874
/** Labels to add to the profile. */
7975
labels: {},
8076
/** Timeout in milliseconds for the upload request. */

src/index.test-d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ expectType<boolean>(start({ appName: 'my-app' }));
88
expectType<boolean>(start({
99
appName: 'my-app',
1010
agentSocket: 'tcp://127.0.0.1:8307',
11-
serverId: 'server-id',
12-
serverToken: 'server-token',
1311
labels: { env: 'production' },
1412
uploadTimeoutMillis: 5000,
1513
}));

tests/index.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ test('Blackfire imports', () => {
88

99
expect(Blackfire.defaultConfig).toHaveProperty('appName');
1010
expect(Blackfire.defaultConfig).toHaveProperty('agentSocket');
11-
expect(Blackfire.defaultConfig).toHaveProperty('serverId');
12-
expect(Blackfire.defaultConfig).toHaveProperty('serverToken');
1311
expect(Blackfire.defaultConfig).toHaveProperty('uploadTimeoutMillis');
1412
expect(Blackfire.defaultConfig).toHaveProperty('labels');
15-
expect(Object.keys(Blackfire.defaultConfig)).toHaveLength(6);
13+
expect(Object.keys(Blackfire.defaultConfig)).toHaveLength(4);
1614
});

0 commit comments

Comments
 (0)