Skip to content

Shared queue consumer telemetry improvements and perf changes #1619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/webapp/app/env.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ const EnvironmentSchema = z.object({

// Internal OTEL environment variables
INTERNAL_OTEL_TRACE_EXPORTER_URL: z.string().optional(),
INTERNAL_OTEL_TRACE_EXPORTER_AUTH_HEADER_NAME: z.string().optional(),
INTERNAL_OTEL_TRACE_EXPORTER_AUTH_HEADER_VALUE: z.string().optional(),
INTERNAL_OTEL_TRACE_EXPORTER_AUTH_HEADERS: z.string().optional(),
INTERNAL_OTEL_TRACE_LOGGING_ENABLED: z.string().default("1"),
// this means 1/20 traces or 5% of traces will be sampled (sampled = recorded)
INTERNAL_OTEL_TRACE_SAMPLING_RATE: z.string().default("20"),
Expand Down
8 changes: 4 additions & 4 deletions apps/webapp/app/models/runtimeEnvironment.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getUsername } from "~/utils/username";
export type { RuntimeEnvironment };

export async function findEnvironmentByApiKey(apiKey: string) {
const environment = await prisma.runtimeEnvironment.findUnique({
const environment = await prisma.runtimeEnvironment.findFirst({
where: {
apiKey,
},
Expand All @@ -25,7 +25,7 @@ export async function findEnvironmentByApiKey(apiKey: string) {
}

export async function findEnvironmentByPublicApiKey(apiKey: string) {
const environment = await prisma.runtimeEnvironment.findUnique({
const environment = await prisma.runtimeEnvironment.findFirst({
where: {
pkApiKey: apiKey,
},
Expand All @@ -45,7 +45,7 @@ export async function findEnvironmentByPublicApiKey(apiKey: string) {
}

export async function findEnvironmentById(id: string) {
const environment = await prisma.runtimeEnvironment.findUnique({
const environment = await prisma.runtimeEnvironment.findFirst({
where: {
id,
},
Expand Down Expand Up @@ -85,7 +85,7 @@ export async function createNewSession(environment: RuntimeEnvironment, ipAddres
}

export async function disconnectSession(environmentId: string) {
const environment = await prisma.runtimeEnvironment.findUnique({
const environment = await prisma.runtimeEnvironment.findFirst({
where: {
id: environmentId,
},
Expand Down
1 change: 0 additions & 1 deletion apps/webapp/app/v3/marqs/devQueueConsumer.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ export class DevQueueConsumer {
kind: SpanKind.CONSUMER,
attributes: {
...attributesFromAuthenticatedEnv(this.env),
[SEMINTATTRS_FORCE_RECORDING]: true,
},
},
ROOT_CONTEXT
Expand Down
Loading
Loading