awsdocs/aws-xray-developer-guide

Invalid Method Signature in Configuring the X-Ray SDK for .NET Page

csantos opened this issue · 0 comments

The Configuring the X-Ray SDK for .NET page has an invalid signature in the example labeled "Example .NET global.asax – Local sampling rules".

The InitializeRecorder method of the AWSXRayRecorder class in the AWSXRayRecorder.Core assembly only has these overloads:

public static void InitializeInstance(IConfiguration configuration)
public static void InitializeInstance(IConfiguration configuration = null, AWSXRayRecorder recorder = null)

The example makes the call as:

var recorder = new AWSXRayRecorderBuilder().WithSamplingStrategy(new LocalizedSamplingStrategy(samplingrules.json)).Build();
AWSXRayRecorder.InitializeInstance(recorder);

Because recorder is the second parameter in the overload, this example does not compile.