diff --git a/.gitignore b/.gitignore index e6cdb91..e0543d7 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,7 @@ obj/ **/.terraform **/node_modules yarn.lock -**/*.copy \ No newline at end of file +**/*.copy + +# Misc +.azure/ \ No newline at end of file diff --git a/host.json b/host.json index 9600b79..8de808d 100644 --- a/host.json +++ b/host.json @@ -6,11 +6,11 @@ }, "extensions": { "eventHubs": { - "maxEventBatchSize": 128, - "batchCheckpointFrequency": 5, - "prefetchCount": 512, - "initialOffsetOptions": { - "type": "fromStart" + "maxEventBatchSize" : 128, + "batchCheckpointFrequency" : 5, + "prefetchCount" : 512, + "initialOffsetOptions" : { + "type" : "fromStart" } }, "http": { @@ -18,16 +18,20 @@ } }, "logging": { - "fileLoggingMode": "always", + "fileLoggingMode": "debugOnly", "logLevel": { - "default": "Information", + "default": "None", "Host.Results": "Error", - "Function": "Information", - "Host.Aggregator": "Trace" + "Function.BizEventEnrichmentProcessor": "Information", + "Function.EventHubBizEventProcessor": "Information", + "Host.Aggregator": "Error" }, "applicationInsights": { "samplingSettings": { - "isEnabled": false + "isEnabled": true, + "maxTelemetryItemsPerSecond": 5, + "includedTypes": "PageView;Trace;Dependency;Request", + "excludedTypes": "Exception;Event;CustomEvent" } } } diff --git a/test-utils/kafka-to-redis/kafka_event_hub_client.js b/test-utils/kafka-to-redis/kafka_event_hub_client.js index 179882b..95d25ce 100644 --- a/test-utils/kafka-to-redis/kafka_event_hub_client.js +++ b/test-utils/kafka-to-redis/kafka_event_hub_client.js @@ -11,8 +11,8 @@ async function eventHubToRedisHandler() { try { console.log("TOPICS ", evhTopics); const kafka = new Kafka({ - clientId: 'kafka-to-redis-app', brokers: [evhHost], // - authenticationTimeout: 10000, // + clientId: 'kafka-to-redis-app', brokers: [evhHost], // + authenticationTimeout: 10000, // reauthenticationThreshold: 10000, ssl: true, sasl: { @@ -44,10 +44,12 @@ async function eventHubToRedisHandler() { let decoder = new TextDecoder("utf-8"); await consumer.run({ eachMessage: async ({ topic, partition, message, heartbeat, pause }) => { - writeOnRedis(client, decoder, message, topic); + if(message && message.value){ + writeOnRedis(client, decoder, message, topic) + } }, }) - + // when call client close? // await client.quit(); } catch (e) {