Enabling profiler real-time monitoring with code-only configuration

Thread is closed for posting
2 posts, 0 answers
  1. Christophla
    Christophla avatar
    28 posts
    Member since:
    Jul 2012

    Posted 13 Mar 2012 Link to this post

    I am currently unable to get any metrics using the profiler service. I can connect, but nothing shows.

    var metadata = new FluentDataSource();
                    var configuration = new BackendConfiguration()
                        Backend = DataAccess.Configuration.DbType
                    configuration.Logging.LogEvents = LoggingLevel.All;
                    configuration.Logging.LogEventsToSysOut = true;
                    configuration.Logging.LogEventsToTrace = true;
                    configuration.Logging.StackTrace = true;
                    configuration.Logging.MetricStoreCapacity = 3600;
                    configuration.Logging.MetricStoreSnapshotInterval = 1000;
                    configuration.Logging.EventStoreCapacity = 10000;
                    _context = new OpenAccessContext(_connectionString, configuration, metadata);

    Is there an equivalent setting in the configuration for "Keep events for profiler" and "Keep metrics for profiler"?

    They are both shown in your examples using the rlinq configuration... i just can't figure out how to set them in code.
  2. Alexander
    Alexander avatar
    727 posts

    Posted 16 Mar 2012 Link to this post

    Hello Christophla,

    The configuration you have is absolutely enough to get the profiling working. Here is what is generated if you enable the logging from the Model Settings dialog of a rlinq diagram:
    public static BackendConfiguration GetBackendConfiguration()
        BackendConfiguration backend = new BackendConfiguration();
        backend.Backend = "mssql";
        backend.ProviderName = "System.Data.SqlClient";
        backend.Logging.LogEvents = LoggingLevel.Normal;
        backend.Logging.StackTrace = true;
        backend.Logging.EventStoreCapacity = 10000;
        backend.Logging.MetricStoreCapacity = 3600;
        return backend;

    As you can see, you already have all the needed entries, so maybe the problem is somewhere else. Are you getting any errors in the status bar of the Profiler? Is it possible that the application completes too fast, so the profiler is not able to download any data? It attempts to do that every second, so the application should run at least 2-3 seconds in order for the profiler to retrieve the data.

    the Telerik team
Back to Top