Unable to Write to Log Analytics Custom Table Using Data Collector API

Jeff Lawlor 21 Reputation points
2022-10-12T21:27:21.48+00:00

We're using a custom table in Log Analytics for application error logging. The setup is: Serilog -> Azure Analytics Sink -> Data Collector API (used in sink) -> Log Analytics Workspace -> Custom Table. There seems to be a secret I'm missing in setting up the custom tables. I have two tables working beautifully. We're not seeing entries in all subsequent tables we've created, even though the API calls are successful. It's like our entries are getting lost after ingestion.

Here's how we're creating the tables:

1. Create a Data Collection Endpoint

It's not used as far as I can tell but you can't create a custom table without one
249809-image.png

2. Create a new custom table in the Tables section of Log Analytics Workspace

It must be DCR-based since MMA-based integrates with an Azure resource rather than the API
249856-image.png

3. Create a Data Collection Rule for the table

I'm not sure whether it is used either but it is required.
249857-image.png

4. Wizard Step 1: Putting it all together

249858-image.png

5. Wizard Step 2

This schema was copied directly from a working custom table.
249837-image.png

6. Wizard Step 3: Review

249819-image.png

7. Edit table modal

This is how our custom table looks after it is created.
249871-image.png

8. Schema modal

This and the previous modal are all you can see after the table is created
249799-image.png

What am I doing this wrong?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,868 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jeff Lawlor 21 Reputation points
    2022-10-14T20:03:00.787+00:00

    Here's the answer for anyone who finds this in the future: Don't create the custom table yourself.

    When you specify a non-existent table in the Data Collector API, Azure will create the table for you. You'll have no trouble writing to the table when Azure creates it.

    It's a simple as that!

    4 people found this answer helpful.
    0 comments No comments

  2. tbgangav-MSFT 10,391 Reputation points
    2022-10-17T09:06:35.907+00:00

    Hi @Jeff Lawlor ,

    Glad to know that you have self-resolved and thanks for sharing it. This will definitely help other community members who might be looking for similar issue. Thanks.

    0 comments No comments