Skip to content

Commit 9bc1acb

Browse files
committed
update doc4
1 parent f0e72c2 commit 9bc1acb

File tree

2 files changed

+14
-24
lines changed

2 files changed

+14
-24
lines changed

articles/synapse-analytics/spark/how-to-use-certsp-emit-log-to-eventhub.md

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -79,28 +79,6 @@ ms.date: 03/24/2025
7979
8080
## Step 7. Configure with a linked service
8181
82-
1. Open your Synapse workspace and create or open a notebook.
83-
2. In the first code cell, add the configuration code to emit logs to Event Hub.
84-
85-
```
86-
{
87-
"conf": {
88-
"spark.synapse.diagnostic.emitters": <EMITTER_NAME>,
89-
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.type": "AzureEventHub",
90-
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.categories": "DriverLog,ExecutorLog,EventLog,Metrics",
91-
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.certificate.keyVault.certificateName": <CERTIFICATE_NAME>",
92-
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.certificate.keyVault.linkedService": <LINKED_SERVICE_NAME>,
93-
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.hostName": <EVENT_HUB_HOST_NAME>,
94-
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.tenantId": <SERVICE_PRINCIPAL_TENANT_ID>,
95-
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.clientId": <SERVICE_PRINCIPAL_CLIENT_ID>,
96-
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.entityPath": <EVENT_HUB_ENTITY_PATH>
97-
},
98-
"jars": [
99-
"Your-specific-jar-in-blob"
100-
]
101-
}
102-
```
103-
10482
Gather the following values and add to the Apache Spark configuration.
10583
10684
- **<EMITTER_NAME>**: The name for the emmiter.
@@ -111,6 +89,18 @@ Gather the following values and add to the Apache Spark configuration.
11189
- **<SERVICE_PRINCIPAL_CLIENT_ID>**: The service principal client id, you can find it in registrations -> your app name -> Overview -> Application(client) ID
11290
- **<EVENT_HUB_ENTITY_PATH>**: The Event Hub entity path, you can find it in Event Hubs Namespace -> Overview -> Host name.
11391
92+
```
93+
"spark.synapse.diagnostic.emitters": <EMITTER_NAME>,
94+
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.type": "AzureEventHub",
95+
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.categories": "DriverLog,ExecutorLog,EventLog,Metrics",
96+
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.certificate.keyVault.certificateName": <CERTIFICATE_NAME>",
97+
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.certificate.keyVault.linkedService": <LINKED_SERVICE_NAME>,
98+
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.hostName": <EVENT_HUB_HOST_NAME>,
99+
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.tenantId": <SERVICE_PRINCIPAL_TENANT_ID>,
100+
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.clientId": <SERVICE_PRINCIPAL_CLIENT_ID>,
101+
"spark.synapse.diagnostic.emitter.<EMITTER_NAME>.entityPath": <EVENT_HUB_ENTITY_PATH>
102+
```
103+
114104
## Step 8. Submit an Apache Spark application and view the logs and metrics
115105
116106
You can use the Apache Log4j library to write custom logs.

articles/synapse-analytics/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,12 +816,12 @@ items:
816816
href: ./spark/azure-synapse-diagnostic-emitters-azure-storage.md
817817
- name: Collect Apache Spark applications logs and metrics with Azure Event Hubs
818818
href: ./spark/azure-synapse-diagnostic-emitters-azure-eventhub.md
819+
- name: Collect Apache Spark applications logs and metrics by certificate and service principal
820+
href: ./spark/how-to-use-certsp-emit-log-to-eventhub.md
819821
- name: Manage Apache Spark configuration
820822
href: ./spark/apache-spark-azure-create-spark-configuration.md
821823
- name: Apache Spark Advisor
822824
href: ./monitoring/apache-spark-advisor.md
823-
- name: Collect Apache Spark applications logs and metrics by certificate and service principal
824-
href: ./spark/how-to-use-certsp-emit-log-to-eventhub.md
825825
- name: Data sources
826826
items:
827827
- name: Azure Cosmos DB Spark 3

0 commit comments

Comments
 (0)