Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7684079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:56:35+00:00 2026-05-31T18:56:35+00:00

I’m trying to use the following code to get all trace data for the

  • 0

I’m trying to use the following code to get all trace data for the last hour from Azure:

                StorageCredentialsAccountAndKey storageCredentialsAccountAndKey = new StorageCredentialsAccountAndKey(accountName, key);
                CloudStorageAccount csa = new CloudStorageAccount(storageCredentialsAccountAndKey, true);
                TableServiceContext tableServiceContext = new TableServiceContext(csa.TableEndpoint.ToString(), csa.Credentials);
                var results = tableServiceContext.CreateQuery<TableServiceEntity>("WADLogsTable").Where(
                    x => x.Timestamp > DateTime.UtcNow.AddHours(-1)).ToList();

However, I’m finding that no results are found when I know that there is data in the table for the last hour (I’m comparing the output to Cerebrata’s Azure Diagnostics Manager).

I have two questions:

  1. Is this the right way to query WADLogsTable? Why am I not seeing any
    results?
  2. What is the correct type to pass in as the generic
    parameter? TableServiceEntity is a base class that only defines
    three columns. I’d like to know if there is a type that represents a
    WADLogsTable entity specifically. Do I just create a type with
    properties the same as the column names?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:56:37+00:00Added an answer on May 31, 2026 at 6:56 pm

    There is no out of the box type (class) that would represent WADLogs entity. Using the base class you will only get the PartionKey, RowKey and Timestamp properties. You have to define it by yourself. Here a sample that I use:

    public class WadLogEntity
           : Microsoft.WindowsAzure.StorageClient.TableServiceEntity
        {
            public WadLogEntity()
            {
                PartitionKey = "a";
                RowKey = string.Format("{0:10}_{1}", DateTime.MaxValue.Ticks - DateTime.Now.Ticks, Guid.NewGuid());
            }
    
            public string Role { get; set; }
            public string RoleInstance { get; set; }
            public int Level { get; set; }
            public string Message { get; set; }
            public int Pid { get; set; }
            public int Tid { get; set; }
            public int EventId { get; set; }
            public DateTime EventDateTime
            {
                get
                {
                    return new DateTime(long.Parse(this.PartitionKey.Substring(1)));
                }
            }
        }
    

    Also, when I was struggling with the WADLogs table, I managed to get it showing the results (for the last 24 hours) with this code:

      var dtThen = DateTime.UtcNow.AddHours(-24);
                    var dtNow = DateTime.UtcNow;
    
                    var logs = this._wadLogs.WadLogs.Where(
                        wl => 
                            wl.Level == 2 
                            && String.Compare(wl.PartitionKey,"0" + dtThen.Ticks.ToString()) >=0
                            && String.Compare(wl.PartitionKey, "0" + dtNow.Ticks.ToString()) < 0
                        ).Take(200);
    

    I noted that there is a “0” prefix in the partition key before the ticks count.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.