Skip to content

Commit 77446ee

Browse files
feat: fully connect server url in tool call logs (#787)
- fully connects server url tracking feature in opt in tool call logs - also cleans a few dead code paths from a previous PR
1 parent eb16572 commit 77446ee

File tree

234 files changed

+2589
-17348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+2589
-17348
lines changed

.changeset/soft-books-talk.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"dashboard": patch
3+
"@gram/client": patch
4+
"server": patch
5+
---
6+
7+
fully connects server url tracking feature in opt in tool call logs

.speakeasy/out.openapi.yaml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9737,6 +9737,9 @@ components:
97379737
http_route:
97389738
type: string
97399739
description: HTTP route
9740+
http_server_url:
9741+
type: string
9742+
description: HTTP Server URL
97409743
id:
97419744
type: string
97429745
description: Id of the request
@@ -9808,6 +9811,7 @@ components:
98089811
- tool_type
98099812
- trace_id
98109813
- span_id
9814+
- http_server_url
98119815
- http_method
98129816
- http_route
98139817
- status_code
@@ -10408,38 +10412,6 @@ components:
1040810412
- name
1040910413
- slug
1041010414
- projects
10411-
OrganizationFeature:
10412-
type: object
10413-
properties:
10414-
created_at:
10415-
type: string
10416-
description: Timestamp when the flag was first created
10417-
format: date-time
10418-
deleted_at:
10419-
type: string
10420-
description: Timestamp when the feature was disabled
10421-
format: date-time
10422-
enabled:
10423-
type: boolean
10424-
description: Indicates if the feature is enabled for the organization
10425-
feature_name:
10426-
type: string
10427-
description: The feature name
10428-
maxLength: 60
10429-
organization_id:
10430-
type: string
10431-
description: The organization that owns the feature flag
10432-
updated_at:
10433-
type: string
10434-
description: Timestamp of the most recent update
10435-
format: date-time
10436-
description: Organization-level feature flag configuration
10437-
required:
10438-
- organization_id
10439-
- feature_name
10440-
- enabled
10441-
- created_at
10442-
- updated_at
1044310415
Package:
1044410416
type: object
1044510417
properties:

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
speakeasyVersion: 1.648.1
1+
speakeasyVersion: 1.650.0
22
sources:
33
Gram-Internal:
44
sourceNamespace: gram-api-description
5-
sourceRevisionDigest: sha256:cdeb790b879bd5d57354c6266fc631007289b1a2aefc68e8de29de5b30b018ab
6-
sourceBlobDigest: sha256:f89916201bf4731597684dbfc763a15a49f5c0efbc6554d113e80da9e7bbe74f
5+
sourceRevisionDigest: sha256:2158f3c904977ad3bfaa18264fe75ca2be862f30a0cba535203c5db9d45c8465
6+
sourceBlobDigest: sha256:ba3c32ef977c109649e6cb42f48a38f8276ede046a478fe0b80ebe351c0a1d29
77
tags:
88
- latest
99
- 0.0.1
1010
targets:
1111
gram-internal:
1212
source: Gram-Internal
1313
sourceNamespace: gram-api-description
14-
sourceRevisionDigest: sha256:cdeb790b879bd5d57354c6266fc631007289b1a2aefc68e8de29de5b30b018ab
15-
sourceBlobDigest: sha256:f89916201bf4731597684dbfc763a15a49f5c0efbc6554d113e80da9e7bbe74f
14+
sourceRevisionDigest: sha256:2158f3c904977ad3bfaa18264fe75ca2be862f30a0cba535203c5db9d45c8465
15+
sourceBlobDigest: sha256:ba3c32ef977c109649e6cb42f48a38f8276ede046a478fe0b80ebe351c0a1d29
1616
codeSamplesNamespace: gram-api-description-typescript-code-samples
17-
codeSamplesRevisionDigest: sha256:2d7d5ce735bb3d9da7e7f053630d30f858f757ab64c21d0fbc01556dbc3f6d52
17+
codeSamplesRevisionDigest: sha256:0c50c19b4abbba32277e64138c18bae85150930922bd62a7c7ea03458de1723c
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: pinned

client/dashboard/src/pages/logs/LogDetailSheet.tsx

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,27 @@ export function LogDetailSheet({log, open, onOpenChange}: LogDetailSheetProps) {
5858
</TabsTrigger>
5959
</TabsList>
6060
<TabsContent value="request" className="flex flex-col gap-6 mt-6">
61+
{log.toolType === "http" && (
62+
<div className="flex flex-col gap-3">
63+
<h3 className="text-sm">Server URL</h3>
64+
<div className="bg-surface-secondary-default border border-neutral-softest rounded-lg p-4 font-mono text-xs break-all">
65+
{log.httpServerUrl}
66+
</div>
67+
</div>
68+
)}
6169
{/* Endpoint */}
62-
<div className="flex flex-col gap-3">
63-
<h3 className="text-sm">Endpoint</h3>
64-
<div
65-
className="bg-surface-secondary-default border border-neutral-softest rounded-lg p-4 flex items-center gap-3 max-h-[100px] overflow-y-auto border-hidden">
66-
<Badge variant={getHttpMethodVariant(log.httpMethod)}>
67-
{log.httpMethod}
68-
</Badge>
69-
<span className="font-mono text-xs">{log.httpRoute}</span>
70+
{log.httpRoute && (
71+
<div className="flex flex-col gap-3">
72+
<h3 className="text-sm">Endpoint</h3>
73+
<div
74+
className="bg-surface-secondary-default border border-neutral-softest rounded-lg p-4 flex items-center gap-3 max-h-[100px] overflow-y-auto border-hidden">
75+
<Badge variant={getHttpMethodVariant(log.httpMethod)}>
76+
{log.httpMethod}
77+
</Badge>
78+
<span className="font-mono text-xs">{log.httpRoute}</span>
79+
</div>
7080
</div>
71-
</div>
81+
)}
7282

7383
{/* Request Headers */}
7484
<div className="flex flex-col gap-3">

client/dashboard/src/pages/logs/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { HTTPToolLog } from "@gram/client/models/components";
2-
import { FileCode, SquareFunction } from "lucide-react";
2+
import { FileCode, PencilRuler, SquareFunction } from "lucide-react";
33
import { dateTimeFormatters } from "@/lib/dates";
44

55
export interface ParsedUrn {
@@ -23,6 +23,9 @@ export const getToolIcon = (toolUrn: string) => {
2323
if (kind === "http") {
2424
return FileCode;
2525
}
26+
if (kind === "prompt") {
27+
return PencilRuler;
28+
}
2629
// Otherwise it's a function tool
2730
return SquareFunction;
2831
};

client/sdk/.speakeasy/gen.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
lockVersion: 2.0.0
22
id: 0e7a6274-2092-40cd-9586-9415c6655c64
33
management:
4-
docChecksum: d5d771145b31d5e07cbc0d803050e861
4+
docChecksum: 3b37da65a45289d78ea5416df260ea2d
55
docVersion: 0.0.1
6-
speakeasyVersion: 1.648.1
7-
generationVersion: 2.739.1
8-
releaseVersion: 0.17.1
9-
configChecksum: f02c74f73f2f803a93139bf3e077430e
6+
speakeasyVersion: 1.650.0
7+
generationVersion: 2.743.2
8+
releaseVersion: 0.17.2
9+
configChecksum: 9c4afa43816512d97cd2ab47708c973b
1010
features:
1111
typescript:
1212
additionalDependencies: 0.1.0
1313
constsAndDefaults: 0.1.12
14-
core: 3.26.0
14+
core: 3.26.3
1515
defaultEnabledRetries: 0.1.0
1616
devContainers: 2.90.1
1717
downloadStreams: 0.1.1
@@ -1695,7 +1695,7 @@ examples:
16951695
tool_type: "http"
16961696
responses:
16971697
"200":
1698-
application/json: {"enabled": false, "logs": [{"deployment_id": "2a25e446-d87e-49c8-ab8c-b3bb267aae46", "duration_ms": 689.89, "http_method": "<value>", "http_route": "<value>", "organization_id": "51b32f4a-389b-4b2b-939b-ee326b00dc01", "span_id": "<id>", "status_code": 43822, "tool_id": "190ecf68-271f-42fa-8e69-a905b9b63ad1", "tool_type": "function", "tool_urn": "<value>", "trace_id": "<id>", "ts": "2024-07-05T07:17:29.939Z", "user_agent": "<value>"}], "pagination": {}}
1698+
application/json: {"enabled": false, "logs": [{"deployment_id": "2a25e446-d87e-49c8-ab8c-b3bb267aae46", "duration_ms": 689.89, "http_method": "<value>", "http_route": "<value>", "http_server_url": "https://concerned-piglet.biz", "organization_id": "51b32f4a-389b-4b2b-939b-ee326b00dc01", "span_id": "<id>", "status_code": 43822, "tool_id": "190ecf68-271f-42fa-8e69-a905b9b63ad1", "tool_type": "function", "tool_urn": "<value>", "trace_id": "<id>", "ts": "2024-07-05T07:17:29.939Z", "user_agent": "<value>"}], "pagination": {}}
16991699
"400":
17001700
application/json: {"fault": false, "id": "123abc", "message": "parameter 'p' must be an integer", "name": "bad_request", "temporary": false, "timeout": false}
17011701
"500":

client/sdk/.speakeasy/gen.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ generation:
2323
sdkHooksConfigAccess: true
2424
schemas:
2525
allOfMergeStrategy: shallowMerge
26+
requestBodyFieldName: ""
2627
tests:
2728
generateTests: true
2829
generateNewTests: false
2930
skipResponseBodyAssertions: false
3031
typescript:
31-
version: 0.17.1
32+
version: 0.17.2
3233
acceptHeaderEnum: true
3334
additionalDependencies:
3435
dependencies: {}
@@ -40,6 +41,7 @@ typescript:
4041
additionalPackageJSON:
4142
private: true
4243
additionalScripts: {}
44+
alwaysIncludeInboundAndOutbound: false
4345
author: Speakeasy
4446
baseErrorName: GramError
4547
clientServerStatusCodesAsErrors: true
@@ -52,6 +54,7 @@ typescript:
5254
enableReactQuery: true
5355
enumFormat: union
5456
envVarPrefix: GRAM
57+
exportZodModelNamespace: false
5558
flattenGlobalSecurity: true
5659
flatteningOrder: parameters-first
5760
generateExamples: true

client/sdk/docs/models/components/httptoollog.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ let value: HTTPToolLog = {
1212
durationMs: 5054.62,
1313
httpMethod: "<value>",
1414
httpRoute: "<value>",
15-
organizationId: "0923092c-52f8-4c1b-aea0-cfcbd19b476d",
15+
httpServerUrl: "https://oblong-contrail.biz/",
16+
organizationId: "092c52f8-c1be-4a0c-bfcb-d19b476d8873",
1617
spanId: "<id>",
17-
statusCode: 518158,
18-
toolId: "73f0840e-0040-4786-864c-e7e89950e406",
18+
statusCode: 28790,
19+
toolId: "840e0040-7866-44ce-97e8-9950e4063310",
1920
toolType: "http",
2021
toolUrn: "<value>",
2122
traceId: "<id>",
22-
ts: new Date("2023-05-16T13:59:48.901Z"),
23+
ts: new Date("2023-08-13T03:36:10.953Z"),
2324
userAgent: "<value>",
2425
};
2526
```
@@ -32,6 +33,7 @@ let value: HTTPToolLog = {
3233
| `durationMs` | *number* | :heavy_check_mark: | Duration in milliseconds |
3334
| `httpMethod` | *string* | :heavy_check_mark: | HTTP method |
3435
| `httpRoute` | *string* | :heavy_check_mark: | HTTP route |
36+
| `httpServerUrl` | *string* | :heavy_check_mark: | HTTP Server URL |
3537
| `id` | *string* | :heavy_minus_sign: | Id of the request |
3638
| `organizationId` | *string* | :heavy_check_mark: | Organization UUID |
3739
| `projectId` | *string* | :heavy_minus_sign: | Project UUID |

client/sdk/docs/models/components/listtoollogresponse.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ let value: ListToolLogResponse = {
1313
durationMs: 7031.96,
1414
httpMethod: "<value>",
1515
httpRoute: "<value>",
16-
organizationId: "87cb84af-d38d-4ef1-a2ac-ce7be9b63e4e",
16+
httpServerUrl: "https://joyous-roadway.net",
17+
organizationId: "84afd38d-ef12-4acc-be7b-e9b63e4eb5ec",
1718
spanId: "<id>",
18-
statusCode: 369282,
19-
toolId: "ecd01b53-9e6e-4859-bcf5-c806d1f6db86",
19+
statusCode: 44086,
20+
toolId: "1b539e6e-859c-4f5c-b806-d1f6db86c008",
2021
toolType: "http",
2122
toolUrn: "<value>",
2223
traceId: "<id>",
23-
ts: new Date("2023-02-23T09:03:30.725Z"),
24+
ts: new Date("2023-09-26T02:29:26.013Z"),
2425
userAgent: "<value>",
2526
},
2627
],

client/sdk/jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "@gram/client",
5-
"version": "0.17.1",
5+
"version": "0.17.2",
66
"exports": {
77
".": "./src/index.ts",
88
"./models/errors": "./src/models/errors/index.ts",

0 commit comments

Comments
 (0)