Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,16 @@ describe('OpenAI integration', () => {
type: 'string',
value: 'auto.ai.openai',
});

// PII attributes must never be recorded when `sendDefaultPii` is disabled.
// Asserting over every span in the envelope catches attributes leaking onto
// spans which are not individually inspected above.
for (const span of container.items) {
expect(span.attributes[GEN_AI_INPUT_MESSAGES]).toBeUndefined();
expect(span.attributes[GEN_AI_SYSTEM_INSTRUCTIONS]).toBeUndefined();
expect(span.attributes[GEN_AI_RESPONSE_TEXT]).toBeUndefined();
expect(span.attributes[GEN_AI_EMBEDDINGS_INPUT]).toBeUndefined();
}
},
})
.start()
Expand Down Expand Up @@ -845,6 +855,16 @@ describe('OpenAI integration', () => {
type: 'integer',
value: 10,
});

// PII attributes must never be recorded when `sendDefaultPii` is disabled.
// Asserting over every span in the envelope catches attributes leaking onto
// spans which are not individually inspected above.
for (const span of container.items) {
expect(span.attributes[GEN_AI_INPUT_MESSAGES]).toBeUndefined();
expect(span.attributes[GEN_AI_SYSTEM_INSTRUCTIONS]).toBeUndefined();
expect(span.attributes[GEN_AI_RESPONSE_TEXT]).toBeUndefined();
expect(span.attributes[GEN_AI_EMBEDDINGS_INPUT]).toBeUndefined();
}
},
})
.start()
Expand Down