Skip to content

Commit

Permalink
fix: OR-1349 use asynchronous index creator
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lesage committed Dec 14, 2023
1 parent 6abbcf4 commit 3e9421c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/otel-collector-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
receivers:
otlp:
protocols:
grpc:
http:
include_metadata: true
cors:
max_age: 7200

exporters:
logging:

otlp/elastic:
endpoint: https://a8e27ab098f54752b227af78fc609169.es.ops.vl.be:9243
headers:
Authorization: "Bearer iHyyarDx8Bvn9WYXDv"

extensions:
health_check:
path: "/health"

processors:
batch:

service:
extensions:
- health_check

pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [logging, otlp/elastic]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [logging, otlp/elastic]
logs:
receivers: [otlp]
processors: [batch]
exporters: [logging, otlp/elastic]
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private static async Task EnsureIndexExists(IElasticClient elasticClient, string
{
if (!(await elasticClient.Indices.ExistsAsync(verenigingenIndexName)).Exists)
{
var response = await elasticClient.Indices.CreateVerenigingIndex(verenigingenIndexName);
var response = await elasticClient.Indices.CreateVerenigingIndexAsync(verenigingenIndexName);

if (!response.IsValid)
throw response.OriginalException;
Expand Down

0 comments on commit 3e9421c

Please sign in to comment.