How do the Traces work ? (mastra cloud/local)

I never see traces, is it normal, do i have to do anything ? i only have logs
No description
9 Replies
Mastra Triager
Mastra Triager2mo ago
GitHub
[DISCORD:1413469646459244544] How do the Traces work ? (mastra clou...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1413469646459244544 I never see traces, is it normal, do i have to do anything ? i only have logs
_roamin_
_roamin_2mo ago
Hey @Rafik Belkadi ! Do you have storage enabled? Could you share your mastra instance config?
Rafik Belkadi
Rafik BelkadiOP2mo ago
import './instrumentation';
import { Mastra } from '@mastra/core/mastra';
import { emailRespondAgent } from './agents/email-respond-agent';
import { MastraJwtAuth } from '@mastra/auth';

export const mastra = new Mastra({
agents: {
emailRespondAgent: emailRespondAgent,
},
server: {
experimental_auth: new MastraJwtAuth({
secret: process.env.MASTRA_JWT_SECRET,
}),
},
telemetry: {
serviceName: 'Reccap',
enabled: true,
sampling: {
type: 'always_on',
},
export: {
type: 'otlp',
// endpoint and headers will be picked up from env vars
endpoint: 'https://ingest.eu.signoz.cloud:443/v1/traces',
},
},
});
import './instrumentation';
import { Mastra } from '@mastra/core/mastra';
import { emailRespondAgent } from './agents/email-respond-agent';
import { MastraJwtAuth } from '@mastra/auth';

export const mastra = new Mastra({
agents: {
emailRespondAgent: emailRespondAgent,
},
server: {
experimental_auth: new MastraJwtAuth({
secret: process.env.MASTRA_JWT_SECRET,
}),
},
telemetry: {
serviceName: 'Reccap',
enabled: true,
sampling: {
type: 'always_on',
},
export: {
type: 'otlp',
// endpoint and headers will be picked up from env vars
endpoint: 'https://ingest.eu.signoz.cloud:443/v1/traces',
},
},
});
`
import { Agent } from '@mastra/core/agent';
import { anthropic } from '@ai-sdk/anthropic';
import { Memory } from '@mastra/memory';
import { openai } from '@ai-sdk/openai';
import { MongoDBStore, MongoDBVector } from '@mastra/mongodb';
import { googleCalendarTool } from '../tools/google-calendar/google-calendar.tool';

const store = new MongoDBStore({
url: process.env.DATABASE_URL!,
dbName: 'recapp',
});

const vectorStore = new MongoDBVector({
uri: process.env.DATABASE_URL!,
dbName: 'recapp',
});

export const emailRespondAgent = new Agent({
name: 'Email Respond Agent',
tools: { googleCalendarTool },

model: anthropic('claude-4-sonnet-20250514'),
memory: new Memory({
embedder: openai.embedding('text-embedding-3-small'),
storage: store,
vector: vectorStore,
options: {
semanticRecall: {
topK: 10, // Increased to get more context
messageRange: {
before: 3,
after: 3,
},
scope: 'resource', // Contact-specific memory
},
},
}),
});
import { Agent } from '@mastra/core/agent';
import { anthropic } from '@ai-sdk/anthropic';
import { Memory } from '@mastra/memory';
import { openai } from '@ai-sdk/openai';
import { MongoDBStore, MongoDBVector } from '@mastra/mongodb';
import { googleCalendarTool } from '../tools/google-calendar/google-calendar.tool';

const store = new MongoDBStore({
url: process.env.DATABASE_URL!,
dbName: 'recapp',
});

const vectorStore = new MongoDBVector({
uri: process.env.DATABASE_URL!,
dbName: 'recapp',
});

export const emailRespondAgent = new Agent({
name: 'Email Respond Agent',
tools: { googleCalendarTool },

model: anthropic('claude-4-sonnet-20250514'),
memory: new Memory({
embedder: openai.embedding('text-embedding-3-small'),
storage: store,
vector: vectorStore,
options: {
semanticRecall: {
topK: 10, // Increased to get more context
messageRange: {
before: 3,
after: 3,
},
scope: 'resource', // Contact-specific memory
},
},
}),
});
_roamin_
_roamin_2mo ago
Hey @Rafik Belkadi ! Do they show in signoz? I don't think you'll be able to see the traces because you've configured your telemetry to use signoz. You could set it up using env vars for example so that you only use signoz in prod
Rafik Belkadi
Rafik BelkadiOP2mo ago
@Romain i don't necessarily want them to be in signoz, if i want it to be directly on mastra cloud what should i do ? (or locally)
_roamin_
_roamin_2mo ago
Try removing
export: {
type: 'otlp',
// endpoint and headers will be picked up from env vars
endpoint: 'https://ingest.eu.signoz.cloud:443/v1/traces',
},
export: {
type: 'otlp',
// endpoint and headers will be picked up from env vars
endpoint: 'https://ingest.eu.signoz.cloud:443/v1/traces',
},
Rafik Belkadi
Rafik BelkadiOP2mo ago
i'll let you know thx Removed that but still not having traces, all packages are at latest version btw
Atiq
Atiq2mo ago
any help on this ?
Rafik Belkadi
Rafik BelkadiOP2mo ago
after sometime now i have the traces on mastra cloud 🙂 @Romain is there a way to search through traces ? with metadata / threadId / messageId ? for debugging purpose

Did you find this page helpful?