Skip to content

Commit

Permalink
Remove old generated public APIs (#6376)
Browse files Browse the repository at this point in the history
## Summary of changes

Delete the Public API Generator

## Reason for change

We added this generator to reduce the amount of boilerplate you need to
write to correctly record telemetry for public APIs. However, with the
move to Datadog.Trace.Manual, these APIs are completely unused, so we
may as well remove the complexity and duplication.

## Implementation details

- Delete the `[GeneratePublicApi]` generator
- Keeping the `[PublicApi]` attribute for now - that will be cleared up
in a separate PR
- Rename the previously-decorated properties that _were_ called
`SomePropInternal` to `SomeProp`
- We still have some "leftover" `Internal` suffixes, will tidy those up
separately
- Main changes are in `TracerSettings`, `ExporterSettings`,
`IntegrationSettings` + their immutable counterparts

## Test coverage

Covered by existing tests

## Other details

I noticed that there were some properties that we were getting public
API telemetry for which we kind of lost in the move to
Datadog.Trace.Manual: `SpanContext.Parent`, `SpanContext.ParentId`,
`SpanContext.ServiceName`. I don't _think_ that actually matters, as
these can't actually be accessed any more for technical reasons...

Part of stack 
- #6370
- #6376 👈 This PR
- #6385
- #6386
- #6397
- #6399
- #6405
  • Loading branch information
andrewlock authored Dec 6, 2024
1 parent 76b6cd1 commit 7ea288c
Show file tree
Hide file tree
Showing 122 changed files with 457 additions and 6,729 deletions.
4 changes: 2 additions & 2 deletions tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogDiagnoser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ private static void SetEnvironmentVariables(DiagnoserActionParameters parameters

if (!environment.TryGetValue(ConfigurationKeys.Environment, out _))
{
environment[ConfigurationKeys.Environment] = tracer.Settings.EnvironmentInternal;
environment[ConfigurationKeys.Environment] = tracer.Settings.Environment;
}

if (!environment.TryGetValue(ConfigurationKeys.ServiceVersion, out _))
{
environment[ConfigurationKeys.ServiceVersion] = tracer.Settings.ServiceVersionInternal;
environment[ConfigurationKeys.ServiceVersion] = tracer.Settings.ServiceVersion;
}

const string ProfilerId = "{846F5F1C-F9AE-4B07-969E-05C26BC060D8}";
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7ea288c

Please sign in to comment.