Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Observability is now enabled by default with console output, eliminating the need for partners and self-hosting customers to configure ENABLE_OBSERVABILITY and ENABLE_A365_OBSERVABILITY environment variables. The ENABLE_A365_OBSERVABILITY_EXPORTER=true environment variable is still required to send telemetry to the Agent365 service.

Changes Made

Default behavior:

  • Observability enabled by default (previously opt-in via ENABLE_OBSERVABILITY and ENABLE_A365_OBSERVABILITY)
  • Logs written to console via ConsoleSpanExporter by default
  • Agent365 service export requires both ENABLE_A365_OBSERVABILITY_EXPORTER=true AND tokenResolver configuration

Environment variables:

  • ENABLE_OBSERVABILITY and ENABLE_A365_OBSERVABILITY - No longer required (enabled by default)
    • Can still be explicitly disabled by setting to false, 0, no, or off
  • ENABLE_A365_OBSERVABILITY_EXPORTER - Still requires explicit =true to send telemetry to Agent365 service
    • Only accepts true, 1, yes, or on to enable

Implementation:

// Before: Required env vars to enable observability
ENABLE_OBSERVABILITY=true
ENABLE_A365_OBSERVABILITY=true

// After: Observability works by default with console logging
const builder = new ObservabilityBuilder()
  .withService('my-agent');
builder.start(); // Console logging enabled by default

// To send to Agent365 service: requires BOTH env var AND token resolver
ENABLE_A365_OBSERVABILITY_EXPORTER=true

const builder = new ObservabilityBuilder()
  .withService('my-agent')
  .withTokenResolver(async () => token);
builder.start(); // Agent365 export enabled

Code quality improvements:

  • Extracted isExplicitlyDisabled() helper to eliminate duplication
  • Simplified ObservabilityBuilder.createBatchProcessor() logic
  • Removed duplicate isAgent365ExporterEnabled() implementation in exporter/utils.ts
  • Updated comments to reflect new behavior

Testing

  • Added comprehensive tests covering default enabled/disabled scenarios
  • All 124 tests pass (including new tests for env var behavior)
  • CodeQL security scan: 0 alerts
Original prompt

This section details on the original issue you should resolve

<issue_title>For Observability to work, we still need the environment variables : ENABLE_A365_OBSERVABILITY_EXPORTER=true ENABLE_OBSERVABILITY=true</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
Inorder to integrate observability into our agents, we are expected to include the environment variables: ENABLE_A365_OBSERVABILITY_EXPORTER=true ENABLE_A365_OBSERVABILITY=true ENABLE_OBSERVABILITY=true while running the agent. Specifically for N8N (one of our 3p Partners), This requires additional burden of documenting this step, specifically for self-hosting customers as well. Since Observability is the crux of Agent 365, why do we need these environment variables even now, why cant they be turned on by default? Is there a target date for when this would be turned on automatically?

Priority you would assign to the feature
High

Describe the solution you'd like
Remove the dependency on these environment variables, since Observability is a main part of Agent 365, it should be ON by default

Describe alternatives you've considered
Specifying these env variables specifically while running the agent

Available workarounds
Specifying these env variables specifically while running the agent, Mentioning in the 3P Partner's official documentation

</issue_description>

<agent_instructions>remove dependency on env variables
ENABLE_A365_OBSERVABILITY=true ENABLE_OBSERVABILITY=true
have it enabled by default. This should write the logs to console</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 5, 2025 23:30
Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Copilot AI changed the title [WIP] Add environment variables for Observability integration Enable observability by default with console logging Dec 5, 2025
Copilot AI requested a review from nikhilNava December 5, 2025 23:43
@nikhilNava
Copy link
Contributor

@copilot - remove reference to ENABLE_OBSERVABILITY=true
ENABLE_A365_OBSERVABILITY=true since its now enabled by default

@nikhilNava
Copy link
Contributor

@copilot ENABLE_A365_OBSERVABILITY_EXPORTER=true should still be required to send logs to the service. Dont make any changes related to that

Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 6, 2025

@copilot - remove reference to ENABLE_OBSERVABILITY=true
ENABLE_A365_OBSERVABILITY=true since its now enabled by default

Done. Removed outdated references in commit fee7e8e:

  1. Updated comment in Agent365ExporterOptions.ts - now clarifies that tokenResolver determines whether telemetry is sent to Agent365 service or logged to console
  2. Removed unnecessary env var setup in observabilityBuilder-options.test.ts - tests now work with the new default-enabled behavior

All 122 observability tests continue to pass.

Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 6, 2025

@copilot ENABLE_A365_OBSERVABILITY_EXPORTER=true should still be required to send logs to the service. Dont make any changes related to that

Understood. Reverted in commit 988da18 - ENABLE_A365_OBSERVABILITY_EXPORTER=true is now required to send telemetry to the Agent365 service.

Current behavior:

  • ENABLE_OBSERVABILITY and ENABLE_A365_OBSERVABILITY - enabled by default ✓
  • ENABLE_A365_OBSERVABILITY_EXPORTER - requires explicit =true to send to service ✓
  • Default: console logging (no service export)
  • With ENABLE_A365_OBSERVABILITY_EXPORTER=true + tokenResolver: sends to Agent365 service

All 124 tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

For Observability to work, we still need the environment variables : ENABLE_A365_OBSERVABILITY_EXPORTER=true ENABLE_OBSERVABILITY=true

2 participants