Skip to content

Commit 0a6d740

Browse files
authored
feat(grpc): add Jaeger gRPC API support (#2)
1 parent 6bfb80e commit 0a6d740

29 files changed

+2432
-200
lines changed

README.md

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ like VS Code, Claude, Cursor, Windsurf Github Copilot via the `jaeger-mcp-server
3838
"command": "npx",
3939
"args": ["-y", "jaeger-mcp-server"],
4040
"env": {
41-
"JAEGER_URL": "<YOUR_JAEGER_HTTP_URL>"
41+
"JAEGER_URL": "<YOUR_JAEGER_HTTP_OR_GRPC_API_URL>"
4242
}
4343
}
4444
}
@@ -50,9 +50,10 @@ like VS Code, Claude, Cursor, Windsurf Github Copilot via the `jaeger-mcp-server
5050

5151
### Environment Variables
5252

53-
- `JAEGER_URL`: HTTP URL of the Jaeger instance to access.
53+
- `JAEGER_URL`: HTTP API (`HTTP JSON` (`/api/v3/*`)) or the gRPC API (`gRPC/Protobuf` (`jaeger.api_v3.QueryService`)) URL of the Jaeger instance to access.
54+
- `JAEGER_PORT`: HTTP or gRPC API port of the Jaeger instance to access. The default value is `16685` for the gRPC API and `16686` for the HTTP API.
5455
- `JAEGER_AUTHORIZATION_HEADER`: `Authorization` HTTP header to be added into the requests for querying traces over Jaeger API (for ex. `Basic <Basic Auth Header>`)
55-
56+
- `JAEGER_PROTOCOL`: API protocol of the Jaeger instance to access. Valid values are `GRPC` and `HTTP`. The default value is `GRPC`. Valid
5657

5758
## Components
5859

@@ -83,7 +84,7 @@ like VS Code, Claude, Cursor, Windsurf Github Copilot via the `jaeger-mcp-server
8384
- `Mandatory`: `false`
8485
- `Type`: `string`
8586
- `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`)
86-
- `get-traces`: Searches the spans as JSON array of object in the OpenTelemetry resource spans format.
87+
- `find-traces`: Searches the spans as JSON array of object in the OpenTelemetry resource spans format.
8788
- `serviceName`:
8889
- `Mandatory`: `true`
8990
- `Type`: `string`
@@ -92,26 +93,48 @@ like VS Code, Claude, Cursor, Windsurf Github Copilot via the `jaeger-mcp-server
9293
- `Mandatory`: `false`
9394
- `Type`: `string`
9495
- `Description`: The start time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`)
95-
- `startTimeMin`:
96-
- `Mandatory`: `true`
97-
- `Type`: `string`
98-
- `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`)
99-
- `startTimeMax`:
100-
- `Mandatory`: `true`
101-
- `Type`: `string`
102-
- `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`)
103-
- `durationMin`:
96+
- `attributes`:
10497
- `Mandatory`: `false`
105-
- `Type`: `string`
106-
- `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`)
107-
- `durationMax`:
108-
- `Mandatory`: `false`
109-
- `Type`: `string`
110-
- `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`)
111-
- `searchDepth`:
112-
- `Mandatory`: `false`
113-
- `Type`: `number`
114-
- `Description`: The end time to filter spans in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`)
98+
- `Type`: `map<string, string | number | boolean>`
99+
- `Description`: Filters spans by span attributes. Attributes can be passed in key/value format in JSON where
100+
keys can be string and values can be string, number (integer or double) or boolean.
101+
For example
102+
103+
```json
104+
{
105+
"stringAttribute": "str",
106+
"integerAttribute": 123,
107+
"doubleAttribute: 123.456,
108+
"booleanAttribute": true,
109+
}
110+
```
111+
- `startTimeMin`:
112+
- `Mandatory`: `true`
113+
- `Type`: `string`
114+
- `Description`: Start of the time interval (inclusive) in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) for the query.
115+
Only traces with spans that started on or after this time will be returned.
116+
- `startTimeMax`:
117+
- `Mandatory`: `true`
118+
- `Type`: `string`
119+
- `Description`: End of the time interval (exclusive) in the RFC 3339, section 5.6 format, (e.g., `2017-07-21T17:32:28Z`) for the query.
120+
Only traces with spans that started before this time will be returned.
121+
- `durationMin`:
122+
- `Mandatory`: `false`
123+
- `Type`: `string`
124+
- `Description`: Minimum duration of a span in **milliseconds** in the trace.
125+
Only traces with spans that lasted at least this long will be returned.
126+
- `durationMax`:
127+
- `Mandatory`: `false`
128+
- `Type`: `string`
129+
- `Description`: Maximum duration of a span in **milliseconds** in the trace.
130+
Only traces with spans that lasted at most this long will be returned.
131+
- `searchDepth`:
132+
- `Mandatory`: `false`
133+
- `Type`: `number`
134+
- `Description`: Defines the maximum search depth.
135+
Depending on the backend storage implementation, this may behave like an SQL `LIMIT` clause.
136+
However, some implementations might not support precise limits
137+
and a larger value generally results in more traces being returned.
115138

116139
### Resources
117140

@@ -120,7 +143,7 @@ N/A
120143

121144
## Roadmap
122145

123-
- Migrate to the Jaeger's `gRPC/Protobuf` (Stable) API from `HTTP JSON` (internal) API for better search capabilities.
146+
- Support `HTTP Stream` transport protocol (`SSE` transport protocol is deprecated in favor of it) to be able to use the MCP server from remote.
124147
- Support more tools which are not directly available over Jaeger API (orchestrating and pipelining multiple API endpoints)
125148

126149

0 commit comments

Comments
 (0)