Skip to content

Commit

Permalink
Added examples for remaining Jaeger Exporter options (#1669)
Browse files Browse the repository at this point in the history
* Added examples for remaining Jaeger Exporter options

* updated process tags to use index initializer syntax

* removed process tags example

* removing process tags, checking format

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
  • Loading branch information
kyle-lt and cijothomas committed Feb 3, 2021
1 parent 2b94460 commit fbfdb70
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/Console/TestJaegerExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System.Diagnostics;
using OpenTelemetry;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
Expand Down Expand Up @@ -44,6 +45,8 @@ internal static object Run(string host, int port)
// (eg: C:\repos\opentelemetry-dotnet\examples\Console\)
//
// dotnet run jaeger -h localhost -p 6831
// For non-Windows (e.g., MacOS)
// dotnet run jaeger -- -h localhost -p 6831
return RunWithActivity(host, port);
}

Expand All @@ -58,6 +61,21 @@ internal static object RunWithActivity(string host, int port)
{
o.AgentHost = host;
o.AgentPort = port;
// Examples for the rest of the options, defaults unless otherwise specified
// Omitting Process Tags example as Resource API is recommended for additional tags
o.MaxPayloadSizeInBytes = 4096;
// Using Batch Exporter (which is default)
// The other option is ExportProcessorType.Simple
o.ExportProcessorType = ExportProcessorType.Batch;
o.BatchExportProcessorOptions = new BatchExportProcessorOptions<Activity>()
{
MaxQueueSize = 2048,
ScheduledDelayMilliseconds = 5000,
ExporterTimeoutMilliseconds = 30000,
MaxExportBatchSize = 512,
};
})
.Build();

Expand Down

0 comments on commit fbfdb70

Please sign in to comment.