Welcome to Portkey Forum

Home
Members
darkprince
d
darkprince
Offline, last seen 3 weeks ago
Joined November 4, 2024
Hey that worked. But I missed the cost calculation

Plain Text
const apiResponse = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "x-portkey-api-key": process.env.PORTKEY_API_KEY,
        "x-portkey-provider": "cerebras",
        "x-portkey-trace-id": metadata.traceID,
        "x-portkey-metadata": JSON.stringify(metadata),
      },
      body: JSON.stringify(logData),
    });

This the code snippet I'm using. I'm passing the provider slug in the header, but it is not registering in the log and not calculating the cost even though the tokens and model info is available.
9 comments
d
W
V
d
darkprince
·

Max spans

The portkey logs tracked with a particular traceID, the LLM calls only show 100 calls, anything more than that it says n spans (hidden). but not able to see them or open them.

We are running an agentic run and in some cases it takes more than 100 calls. So can somebody help me with this.
3 comments
W
d
d
darkprince
·

Traces

@Brandon Watts
Documentation is a bit confusing here. I had the same issue. Passing the traceID outside metadata will get you what you want. also you can pass span_name (Inside metadata) to change the name from llm to whatever name you want.

I'm using node SDK, so I'm not able to give you an exact code snippet. But try giving traceID outside metadata.
6 comments
V
B
Are you guys providing any external API which we can use to pull information specific to a traceID or something similar? We are thinking of benchmarking and logs from porkey specific to traceID would be useful.
4 comments
d
V
S
Hey, I was trying out to Gemini models to work for our agentic run. The run requires vision capabilities and tool calling. I'm getting error from the google, saying that the there is a format issue. So how can I provide image and tools to gemini using portkey.

I'm using portkey SDK for this and the format is based on OpenAI.
14 comments
S
d
Hi,

I'm tracking my LLM calls now and waiting for custom span name. But I was working how can i track other calls like retrieval calls and so.

I saw this screenshot in the tracing documentation, but there is no mention on how we can do that?
6 comments
d
V
In my agent run, I have a bunch of LLM calls and I need to provide a name for each call or particular calls so that it is easier to identify. Right now it is hard to indentify unless and click to show the details panel.

I;m attaching a screenshot. Is it possible to pass name along with custom traceID.
11 comments
d
r
W