Skip to content

Commit fe2336d

Browse files
Add code snippet for TraceAttribute into README
1 parent 5154c99 commit fe2336d

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

docs/Datadog.Trace.Annotations/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,22 @@ This package contains custom attribute types to enable additional features of th
77
> Note: If you are unable to add new package references to your application, you may still enable this functionality by defining types inside your application whose full name and type members match the definitions in this package.
88
99
## Attributes
10+
### Datadog.Trace.Annotations.TraceAttribute
11+
An attribute that marks the decorated method to be instrumented by Datadog automatic instrumentation. [Source](https://github.com/DataDog/dd-trace-dotnet/tree/master/tracer/src/Datadog.Trace.Annotations/TraceAttribute.cs)
1012

11-
- [Datadog.Trace.Annotations.TraceAttribute](https://github.com/DataDog/dd-trace-dotnet/tree/master/tracer/src/Datadog.Trace.Annotations/TraceAttribute.cs): An attribute that marks the decorated method to be instrumented by Datadog automatic instrumentation.
13+
```csharp
14+
using System;
15+
16+
namespace Datadog.Trace.Annotations;
17+
18+
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
19+
public class TraceAttribute : Attribute
20+
{
21+
public string OperationName { get; set; }
22+
23+
public string ResourceName { get; set; }
24+
}
25+
```
1226

1327
## Get in touch
1428

0 commit comments

Comments
 (0)