Skip to content

Commit

Permalink
feat: Add feature flag for LangChain instrumentation (#1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr committed Jan 31, 2024
1 parent a889d68 commit ab04e7a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions documentation/feature-flags.md
Expand Up @@ -44,3 +44,9 @@ Any prerelease flags can be enabled or disabled in your agent config by adding a
* Configuration: `{ feature_flag: { aws_bedrock_instrumentation: true|false }}`
* Environment Variable: `NEW_RELIC_FEATURE_FLAG_AWS_BEDROCK_INSTRUMENTATION`
* Description: Enables instrumentation of AWS Bedrock in `aws-sdk@3`.

#### langchain_instrumentation
* Enabled by default: `false`
* Configuration: `{ feature_flag: { langchain_instrumentation: true|false }}`
* Environment Variable: `NEW_RELIC_FEATURE_FLAG_LANGCHAIN_INSTRUMENTATION`
* Description: Enables instrumentation of the LangChain LLM library.
3 changes: 2 additions & 1 deletion lib/feature_flags.js
Expand Up @@ -12,7 +12,8 @@ exports.prerelease = {
reverse_naming_rules: false,
undici_async_tracking: true,
unresolved_promise_cleanup: true,
legacy_context_manager: false
legacy_context_manager: false,
langchain_instrumentation: false
}

// flags that are no longer used for released features
Expand Down
3 changes: 2 additions & 1 deletion test/unit/feature_flag.test.js
Expand Up @@ -35,7 +35,8 @@ const used = [
'unresolved_promise_cleanup',
'undici_instrumentation',
'undici_async_tracking',
'aws_bedrock_instrumentation'
'aws_bedrock_instrumentation',
'langchain_instrumentation'
]

tap.test('feature flags', (t) => {
Expand Down

0 comments on commit ab04e7a

Please sign in to comment.